Edit

Share via


Get-CMAdministrativeUser

Get an administrative user.

Syntax

SearchByName (Default)

Get-CMAdministrativeUser
    [-Name <String>]
    [-RoleName <String[]>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

SearchByIdMandatory

Get-CMAdministrativeUser
    -Id <String>
    [-RoleName <String[]>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

Description

Use this cmdlet to get one or more administrative users in Configuration Manager. An administrative user has a defined set of permissions and may be a member of one or more scopes or roles. An administrative user in Configuration Manager defines a local or domain user or group. 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: Get all administrative users

This command gets all administrative users. It displays the output as a table showing the account name (LogonName), security roles (RoleNames), security scopes (CategoryNames), and collections (CollectionNames).

Get-CMAdministrativeUser | Select-Object LogonName, RoleNames, CategoryNames, CollectionNames

Example 2: Get an administrative user by name

This command gets the administrative user named jqpublic.

Get-CMAdministrativeUser -Name "Contoso\jqpublic"

Example 3: Get all users with specific scope

This command gets all administrative users with the Default scope and displays the account names.

Get-CMAdministrativeUser | Where-Object { $_.CategoryNames -contains "Default" } | Select-Object LogonName

Example 4: Get all users with specific role

This command gets all administrative users with the Full Administrator role and displays the account names.

Get-CMAdministrativeUser -RoleName "Full Administrator" | Select-Object LogonName

Parameters

-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

-Id

Specify the ID of the administrative user to get. This value is the AdminID property. It's an integer value, for example 16777234.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AdminId

Parameter sets

SearchByIdMandatory
Position:Named
Mandatory:True
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 get. For example, domain\username or domain\groupname

You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:DisplayName, LogonName, UserName

Parameter sets

SearchByName
Position:Named
Mandatory:False
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
Aliases:RoleNames

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

IResultObject

Notes

For more information on this return object and its properties, see SMS_Admin server WMI class.