File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ The Add-AzureADMSScopedRoleMembership cmdlet adds a scoped role membership to an
23
23
## EXAMPLES
24
24
25
25
### Example 1
26
+
26
27
```
27
28
$User = Get-AzureADUser -SearchString "The user that will be an admin on this unit"
28
29
$Role = Get-AzureADDirectoryRole | Where-Object -Property DisplayName -EQ -Value "User Account Administrator"
29
- $Unit = Get-AzureADMSAdministrativeUnit | Where-Object -Property DisplayName -Eq -Value "<The display name of the unit"
30
+ $Unit = Get-AzureADMSAdministrativeUnit | Where-Object -Property DisplayName -Eq -Value "<The display name of the unit> "
30
31
$RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRolememberinfo.RoleMemberInfo
31
32
$RoleMember.Id = $User.ObjectID
32
33
Add-AzureADMSScopedRoleMembership -Id $Unit.Id -RoleId $Role.ObjectId -RoleMemberInfo $RoleMember
You can’t perform that action at this time.
0 commit comments