Get-CMDeviceCollection
Get-CMDeviceCollection
Gets one or more device collections in the Configuration Manager hierarchy.
Syntax
Parameter Set: SearchByName
Get-CMDeviceCollection [-Name <String> ] [ <CommonParameters>]
Parameter Set: SearchByDPGroupId
Get-CMDeviceCollection -DistributionPointGroupId <String> [ <CommonParameters>]
Parameter Set: SearchByDPGroupName
Get-CMDeviceCollection -DistributionPointGroupName <String> [ <CommonParameters>]
Parameter Set: SearchByIdMandatory
Get-CMDeviceCollection -CollectionId <String> [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Get-CMDeviceCollection -DistributionPointGroup <IResultObject> [ <CommonParameters>]
Detailed Description
The Get-CMDeviceCollection cmdlet retrieves collections that contain computers or mobile devices. For more information about collections, see Introduction to Collections in Configuration Manager.
Parameters
-CollectionId<String>
Specifies the ID of the device collection.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DistributionPointGroup<IResultObject>
Specifies an object that represents a distribution point group that is associated with the device collections.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DistributionPointGroupId<String>
Specifies the Id of a distribution point group that is associated with the device collections.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DistributionPointGroupName<String>
Specifies the name of a distribution point group that is associated with the device collections.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the names of the device collections. If a specific collection is not specified, all device collections in the hierarchy are returned.
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 device collection by using an ID
This command gets the device collection that has the ID 9990000D.
PS C:\> Get-CMDeviceCollection -CollectionId "9990000D"