Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Set-CMDeviceVariable

System Center 2012 R2

Set-CMDeviceVariable

Modifies a device variable.

Syntax

Parameter Set: SearchByNameMandatory
Set-CMDeviceVariable -DeviceName <String> -IsMask <Boolean> -NewVariableName <String> -NewVariableValue <String> -VariableName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetByIdMandatory
Set-CMDeviceVariable -ResourceId <String> -VariableName <String> [-IsMask <Boolean> ] [-NewVariableName <String> ] [-NewVariableValue <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetByValueMandatory
Set-CMDeviceVariable -Device <IResultObject> -VariableName <String> [-IsMask <Boolean> ] [-NewVariableName <String> ] [-NewVariableValue <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

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

Parameters

-Device<IResultObject>

Specifies a CMDevice object. To obtain a CMDevice object, use the Get-CMDevice cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceName<String>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IsMask<Boolean>

Indicates whether a value displays in the Configuration Manager console.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewVariableName<String>

Specifies a name for the variable that this cmdlet modifies.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewVariableValue<String>

Specifies a value for the variable that this cmdlet modifies.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ResourceId<String>

Specifies a Systems Management Server (SMS) ID.


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 device variable.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://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: Modify a device variable

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.


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

Related topics

Community Additions

ADD
Show:
© 2016 Microsoft