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.
Creates a task sequence variable for a device collection in the Configuration Manager hierarchy.
Parameter Set: NewByNameMandatory
New-CMDeviceCollectionVariable -CollectionName <String> -VariableName <String> [-IsMask <Boolean> ] [-VariableValue <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewByIdMandatory
New-CMDeviceCollectionVariable -CollectionId <String> -VariableName <String> [-IsMask <Boolean> ] [-VariableValue <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewByValueMandatory
New-CMDeviceCollectionVariable -Collection <IResultObject> -VariableName <String> [-IsMask <Boolean> ] [-VariableValue <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
The New-CMDeviceCollectionVariable cmdlet creates a task sequence variable for the device collection. You can specify the device collection by its name, ID, or specify on object that represents the 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.
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 |
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 |
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 |
Indicates whether a value displays in the Configuration Manager console.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies the name of the task sequence variable.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies a value that you assign to a collection variable in Configuration Manager.
Custom task sequence variables include sets of name and value pairs that supply configuration and operating system deployment settings for a device, operating system and user state configuration tasks on a Configuration Manager client computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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).
The input type is the type of the objects that you can pipe to the cmdlet.
The output type is the type of the objects that the cmdlet emits.
This command creates a task sequence variable named New_ComputerName for the device collection named All Unknown Devices.
PS C:\> New-CMDeviceCollectionVariable -CollectionName "All Unknown Devices" -VariableName "New_ComputerName"
Get-CMDeviceCollectionVariable
Set-CMDeviceCollectionVariable