@@ -482,23 +482,22 @@ Tests verifies creation and validation of RoleAssignment properties for not null
482
482
function Test-RaPropertiesValidation
483
483
{
484
484
# Setup
485
- # $users = Get-AzADUser | Select-Object -First 1 -Wait
486
485
$userId = " 66486765-477a-4243-880c-7e1fb3c80f2b"
487
486
$subscription = $ (Get-AzContext ).Subscription
488
487
$scope = ' /subscriptions/' + $subscription [0 ].Id
489
488
$roleDef = Get-AzRoleDefinition - Name " Reader"
490
489
$roleDef.Id = " ff9cd1ab-d763-486f-b253-51a816c92aaf"
491
- $roleDef.Name = " Reader vm For Test 1023 "
490
+ $roleDef.Name = " Reader vm For Test 1024 "
492
491
$roleDef.Actions.Add (" Microsoft.ClassicCompute/virtualMachines/restart/action" )
493
492
$roleDef.Description = " Read, monitor and restart virtual machines"
494
- $roleDef.AssignableScopes [0 ] = ' /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590' # "/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f"
493
+ $roleDef.AssignableScopes [0 ] = ' /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590'
495
494
496
- New-AzRoleDefinitionWithId - Role $roleDef - RoleDefinitionId 14347f94 - 76d9- 48f6- 932e - 7997d99a45b2
497
- $rd = Get-AzRoleDefinition - Name " Reader vm"
495
+ New-AzRoleDefinitionWithId - Role $roleDef - RoleDefinitionId 14347f95 - 76d9- 48f6- 932e - 7997d99a45b2
496
+ $rd = Get-AzRoleDefinition - Name " Reader vm For Test 1023 "
498
497
499
498
$newAssignment = New-AzRoleAssignmentWithId `
500
499
- ObjectId $userId `
501
- - RoleDefinitionName " Reader vm" `
500
+ - RoleDefinitionName " Reader vm For Test 1023 " `
502
501
- Scope $scope `
503
502
- RoleAssignmentId 584d33a3- b14d- 4eb4- 863e - 0df67b178389
504
503
0 commit comments