Get-CMAdministrativeUser

Get an administrative user.

Syntax

Get-CMAdministrativeUser
   [-Name <String>]
   [-RoleName <String[]>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
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.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Aliases:AdminId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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
Type:String
Aliases:DisplayName, LogonName, UserName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-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.

Type:String[]
Aliases:RoleNames
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

IResultObject[]

IResultObject

Notes

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