This commit is contained in:
Caroline 2023-03-29 17:14:37 -07:00
Родитель 309cb5ae58
Коммит 843f76e6ce
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -52,7 +52,7 @@ function Confirm-RoleAssignment {
}
Process {
$params = @{
ServicePrincipalName = $ServicePrincipalId
ServicePrincipalName = $ServicePrincipalId
RoleDefinitionName = $RoleDefinitionName
Scope = $Scope
}

Просмотреть файл

@ -1,6 +1,8 @@
# How To Run RoleAssignment.Tests.ps1
`RoleAssignment.Tests.ps1` contains examples of using the `Confirm-AzBPRoleAssignment` cmdlet.
Role assignments in Azure do not belong to a location or a resource group, so the example tests
do not check for this.
## Pre-Requisites
@ -15,14 +17,14 @@
```
1. Deploy the Role Assignment to your subscription:
You will need Owner permission or higher
You will need Owner permission or higher.
```Powershell
New-AzSubscriptionDeployment -TemplateFile ".\roleAssignment.bicep" `
-Location "WestUS3"
```
1. When prompted in your terminal, set the `svcPrincipalObjectId` parameter with your service principal's object ID.
1. When prompted in your terminal, set the `principalId` parameter with your service principal's object ID.
1. Update `RoleAssignment.Tests.ps1` variables to point to your expected resources: