New-CMAdministrativeUser
Create an administrative user.
Syntax
New
New-CMAdministrativeUser
-Name <String>
-RoleName <String[]>
[-CollectionName <String[]>]
[-SecurityScopeName <String[]>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Advanced
New-CMAdministrativeUser
-Name <String>
-Permission <IResultObject[]>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use this cmdlet to create an administrative user for Configuration Manager. An administrative user in Configuration Manager defines a local or domain user or group. When you create the administrative user in Configuration Manager, you can give it access to security roles, security scopes, and collections. For more information about security roles, see Fundamentals of role-based administration in Configuration Manager.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: Add an administrative user
This command adds the Contoso domain user named AdminUser1 as an administrative user. It adds this user to the Application Administrator and Software Update Manager built-in security roles. The command also adds the user to the scope1 and scope2 security scopes, and to the userCollection1 and deviceCollection1 collections.
$name = "Contoso\AdminUser1"
$roles = "Application Administrator","Software Update Manager"
$scopes = "scope1","scope2"
$colls = "userCollection1","deviceCollection1"
New-CMAdministrativeUser -Name $name -RoleName $roles -SecurityScopeName $scopes -CollectionName $colls
Example 2: Add a domain group
This example adds the Contoso domain group Security Analysts to the built-in Read-only Analyst security role.
New-CMAdministrativeUser -Name "Contoso\Security Analysts" -RoleName "Read-only Analyst"
Parameters
-CollectionName
Specify an array of collection names. The cmdlet assigns the new administrative user to each of these collections.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
New
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specify the name of the administrative user to add. Use the format domain\name
, where name
is either the user or the group.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | LogonName |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Permission
Specify an array of permissions objects to assign to this new user. To get these objects, use the New-CMAdministrativeUserPermission cmdlet.
Parameter properties
Type: | IResultObject[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Permissions |
Parameter sets
Advanced
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RoleName
Specify an array of security role names. This name can be for a built-in or custom role. To see the list of built-in security roles, see Security roles.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
New
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SecurityScopeName
Specify an array of security scope names. A security scope name can be "Default" or the name of a custom security scope. The cmdlet assigns the security scopes that you specify to the administrative user.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
New
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
IResultObject
Notes
For more information on this return object and its properties, see SMS_Admin server WMI class.