Set-CMSecurityRole
Updated: March 1, 2013
Applies To: System Center 2012 Configuration Manager SP1
Set-CMSecurityRole
Syntax
Parameter Set: SetById Set-CMSecurityRole -Id <String[]> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SetByName Set-CMSecurityRole -Name <String[]> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SetByValue Set-CMSecurityRole -InputObject <IResultObject> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMSecurityRole cmdlet changes configuration settings of a security role. You can use this cmdlet to change the name and description of a security role.
Parameters
-Description<String>
Specifies the description of a security role.
Aliases | RoleDescription |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Id<String[]>
Specifies an array of IDs of security roles.
Aliases | RoleId |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-InputObject<IResultObject>
Specifies a CMSecurityRole object. To obtain a CMSecurityRole object, use the Get-CMSecurityRole cmdlet.
Aliases | none |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Name<String[]>
Specifies an array of names of security roles.
Aliases | RoleName |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-NewName<String>
Specifies a new name for the security role.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Confirm
Prompts you for confirmation before executing the command.
Required? | false |
Position? | named |
Default Value | false |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required? | false |
Position? | named |
Default Value | false |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Change the name of a security role by using an ID
This command renames the security role that has the ID CM100003. The command changes the name to RTOperator02.
PS C:\> Set-CMSecurityRole -ID "CM100003" -NewName "RTOperator02"
Example 2: Change the name of a security role by using a name
This command renames the security role named SRole02. The command changes the name to RTOperator02.
PS C:\> Set-CMSecurityRole -Name "SRole02" -NewName "RTOperator02"
Example 3: Change the name of a security role by using an object variable
The first command gets the security role that has the ID CM100003 and stores it in the $Srole variable.
The second command renames the security role for the object stored in $Srole. The command changes the name to RTOperator02.
PS C:\> $Srole = Get-CMSecurityRole -ID "CM100003"PS C:\>Set-CMSecurityRole -Inputobject $Srole -NewName "RTOperator02"
