Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds a member to a user role.
Parameter Set: Default
Add-SCACUserRoleMember [-UserRole] <ACUserRole> [-Member] <String> [ <CommonParameters>]
The Add-SCACUserRoleMember function adds a member to a specified user role.
Specifies the name of a member to add to a user role.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the user role object to which to add members. To retrieve a user role object, use the Get-SCACUserRole cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
The output type is the type of the objects that the cmdlet emits.
Description
-----------
The first command gets the user role object named UserRole01 and stores the object in the $UserRole variable.
The second command removes the user role member named Contoso\ReneeLo from the user role stored in $UserRole.
PS C:\> $UserRole = Get-SCACUserRole –Managed | where { $_.Name –eq "UserRole01" }
PS C:\> Add-SCACUserRoleMember –UserRole $UserRole –Member "Contoso\ReneeLo"