Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Get-CMUser
Gets a user of the Configuration Manager hierarchy.
Syntax
Parameter Set: ByName
Get-CMUser [-Name <String> ] [ <CommonParameters>]
Parameter Set: ById
Get-CMUser -Id <String> [ <CommonParameters>]
Parameter Set: SearchByIdMandatory
Get-CMUser -CollectionId <String> [-Name <String> ] [ <CommonParameters>]
Parameter Set: SearchByNameMandatory
Get-CMUser -CollectionName <String> [-Name <String> ] [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Get-CMUser -Collection <IResultObject> [-Name <String> ] [ <CommonParameters>]
Detailed Description
The Get-CMUser cmdlet retrieves a user object that can be added to a collection.
To add a user to a collection use the Add-CMUserCollectionDirectMembershipRule cmdlet. For more information about Microsoft System Center 2012 SP1 Configuration Manager collections, see Introduction to Collections in Configuration Manager (https://go.microsoft.com/fwlink/p/?LinkID=259433) on TechNet.
Parameters
-Collection<IResultObject>
Specifies a Configuration Manager user collection object. To obtain a user collection object, use the Get-CMUserCollection cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-CollectionId<String>
Specifies the ID of a user collection in Configuration Manager.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-CollectionName<String>
Specifies the name of a user collection in Configuration Manager.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Id<String>
Specifies the ID of the user to retrieve.
Aliases |
ResourceID |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of the user to retrieve.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Get a user
This command gets the user of the Configuration Manager hierarchy named PattiFuller.
PS C:\> Get-CMUser -Name "CENTRAL\PattiFuller"