Edit

Share via


Get-CMDeviceCollection

Get one or more device collections.

Syntax

ByName (Default)

Get-CMDeviceCollection
    [-Name <String>]
    [<CommonParameters>]

ById

Get-CMDeviceCollection
    -Id <String>
    [<CommonParameters>]

ByDPGroupName

Get-CMDeviceCollection
    -DistributionPointGroupName <String>
    [<CommonParameters>]

ByDPGroupId

Get-CMDeviceCollection
    -DistributionPointGroupId <String>
    [<CommonParameters>]

ByDPGroup

Get-CMDeviceCollection
    -DistributionPointGroup <IResultObject>
    [<CommonParameters>]

Description

Use this cmdlet to get one or more device collections. To get either user or device collections, use the Get-CMCollection cmdlet. For more information about collections, see Introduction to Collections 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 a device collection by using an ID

This command gets the default device collection All Systems with ID SMS00001.

Get-CMDeviceCollection -CollectionId "SM00001"

Example 2: Get all device collections associated with a distribution point group

This example gets all device collections associated with the distribution point group named dpg1.

Get-CMDeviceCollection -DistributionPointGroupName "dpg1"

When you distribute content to these collections, the site automatically distributes to all current members of this distribution point group. For more information, see Manage distribution point groups.

Parameters

-DistributionPointGroup

Specify a distribution point group object that's associated with this collection. To get this object, use the Get-CMDistributionPointGroup cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByDPGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DistributionPointGroupId

Specify the GUID for a distribution point group that's associated with this collection. This value is the GroupID property, which is a standard GUID surrounded by curly brackets, for example, {537e6303-69eb-4104-bf7b-7baf43ce2352}.

Parameter properties

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

Parameter sets

ByDPGroupId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DistributionPointGroupName

Specify the name of a distribution point group that's associated with this collection.

Parameter properties

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

Parameter sets

ByDPGroupName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specify the ID of the device collection to get. This value is the CollectionID property, for example, XYZ00012 or SMS00001.

Parameter properties

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

Parameter sets

ById
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 device collection to get.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

ByName
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

System.Object

Notes

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