Set-CMDeviceVariable

Modifies a device variable.

Syntax

Set-CMDeviceVariable
   [-Confirm]
   -DeviceName <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-IsMask <Boolean>]
   [-NewVariableName <String>]
   [-NewVariableValue <String>]
   -VariableName <String>
   [-WhatIf]
   [<CommonParameters>]
Set-CMDeviceVariable [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling]
 -InputObject  [-IsMask ] [-NewVariableName ] [-NewVariableValue ]
 -VariableName  [-WhatIf] []
Set-CMDeviceVariable [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] [-IsMask ]
 [-NewVariableName ] [-NewVariableValue ] -ResourceId  -VariableName  [-WhatIf]
 []

Description

The Set-CMDeviceVariable cmdlet modifies a device variable. Individual devices have device variables. Task sequence processing uses device variables.

Examples

Example 1: Modify a device variable

PS C:\> Set-CMDeviceVariable -DeviceName "gateway-server.contoso.com" -VariableName "ServerIPAddress" -NewVariableValue "192.168.100.10"

This command modifies the device variable ServerIPAddress associated with the device gateway-server.contoso.com. In this example, the value of the variable is set to 192.168.100.10.

Required Parameters

-DeviceName

Specifies a device name. You can specify a NetBIOS name or a fully qualified domain name (FQDN).

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type:IResultObject
Aliases:Device
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ResourceId

Specifies a Systems Management Server (SMS) ID.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VariableName

Specifies the name of the device variable.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsMask

Indicates whether a value displays in the Configuration Manager console.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewVariableName

Specifies a name for the variable that this cmdlet modifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewVariableValue

Specifies a value for the variable that this cmdlet modifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False