Get-CMUser

Gets a Configuration Manager user.

Syntax

Get-CMUser
   -CollectionId <String>
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMUser
   -CollectionName <String>
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMUser
   -InputObject <IResultObject>
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMUser
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMUser
   -ResourceId <Int32>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMUser cmdlet gets a Microsoft System Center Configuration Manager user object.

Examples

Example 1: Get a user by name

PS C:\> Get-CMUser -CollectionName "All Users" -Name "Contoso\username01"

This command gets the user named username01 from the All Users collection.

Example 2: Pass a collection and get a user from it

PS C:\> Get-CMCollection -Name "All Users" | Get-CMUser -Name "Contoso\testuser01"

This command gets the collection object named All Users and uses the pipeline operator to pass the object to Get-CMUser, which gets the user named testuser01 from the collection object.

Required Parameters

-CollectionId

Specifies the ID of a user collection.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName

Specifies the name of a user collection.

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

Specifies a collection object. To obtain a collection object, use the Get-CMCollection cmdlet.

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

Specifies the resource ID of a user.

Type:Int32
Aliases:Id, UserId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Specifies the name of a user.

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