Add-CMSecurityRoleToAdministrativeUser

Adds a security role to an administrative user or group in Configuration Manager.

Syntax

Add-CMSecurityRoleToAdministrativeUser
   -AdministrativeUser <IResultObject>
   [-Confirm]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   -RoleId <String>
   [-WhatIf]
   [<CommonParameters>]
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUser  [-Confirm]
 [-DisableWildcardHandling] [-ForceWildcardHandling] -RoleName  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUser  [-Confirm]
 [-DisableWildcardHandling] [-ForceWildcardHandling] -InputObject  [-WhatIf]
 []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserId  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -RoleId  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserId  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -RoleName  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserId  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -InputObject  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserName  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -RoleName  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserName  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -RoleId  [-WhatIf] []
Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserName  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] -InputObject  [-WhatIf] []

Description

The Add-CMSecurityRoleToAdministrativeUser cmdlet adds a security role to an administrative user or administrative group in Microsoft System Center Configuration Manager.

Permissions defined in a role represent object types and actions available for each object type. System Center Configuration Manager provides some built-in security roles. You can also create custom security roles. For more information about security roles, see Configuring Security for Configuration Manager on TechNet.

You can specify an administrative user or group by name or by ID or you can use the use the Get-CMAdministrativeUser cmdlet to obtain a user or group object. You can specify a role to add by name or by ID, or you can use the Get-CMSecurityRole cmdlet to obtain a role.

Examples

Example 1: Add a named role to a named user group

PS C:\>Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserName "Western Administrators " -RoleName "SecurityRole17"

This command adds a security role named SecurityRole17 to the administrative group named Western Administrators.

Example 2: Add a role to a named user group identified by using an ID

PS C:\>Add-CMSecurityRoleToAdministrativeUser -AdministrativeUserName "Western Administrators" -RoleId "SMS38973"

This command adds a security role that has the specified ID to the administrative group named Western Administrators.

Required Parameters

-AdministrativeUser

Specifies an administrative user or administrative group object. To obtain an administrative user or administrative group object, use the Get-CMAdministrativeUser cmdlet.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-AdministrativeUserId

Specifies an ID of an administrative user or administrative group.

Type:Int32
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AdministrativeUserName

Specifies a name of an administrative user or administrative group.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type:IResultObject
Aliases:Role
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RoleId

Specifies an ID of a role. A role represents Configuration Manager permissions granted to a user.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RoleName

Specifies a name of a role. A role represents Configuration Manager permissions granted to a user.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False