Get-CMDeviceCollectionVariable

Get-CMDeviceCollectionVariable

Gets the task sequence variables for a device collection in the Configuration Manager hierarchy.

Syntax

Parameter Set: SearchByNameMandatory
Get-CMDeviceCollectionVariable -CollectionName <String> -VariableName <String> [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Get-CMDeviceCollectionVariable -CollectionId <String> -VariableName <String> [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Get-CMDeviceCollectionVariable -Collection <IResultObject> -VariableName <String> [ <CommonParameters>]

Detailed Description

The Get-CMDeviceCollectionVariable cmdlet gets the variables of the task sequences for a device collection.

Task sequence variables are a set of name and value pairs that provide a mechanism to configure and customize the steps of a task sequence when the task sequence is deployed to a specific collection. For more information about task sequence variables, see Planning a Task Sequence Strategy in Configuration Manager (https://go.microsoft.com/fwlink/p/?LinkID=260806) 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 the device collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CollectionName<String>

Specifies the name of the device collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-VariableName<String>

Specifies the name of the variable. If you do not specify this parameter, the cmdlet returns all the variables for the collection.

Aliases

none

Required?

true

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 task sequence variables for all device collections

This command gets the task sequence variables for all device collections.

PS C:\> Get-CMDeviceCollectionVariable -CollectionName "" -VariableName ""

Set-CMDeviceCollectionVariable

New-CMDeviceCollectionVariable

Remove-CMDeviceCollectionVariable

Get-CMUserCollection

Planning a Task Sequence Strategy in Configuration Manager