Remove-CMDeviceVariable

Removes a variable defined for a device.

Syntax

Remove-CMDeviceVariable
      [-Confirm]
      -Device <IResultObject>
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -VariableName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMDeviceVariable [-Confirm] -DeviceName  [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -VariableName  [-WhatIf] []
Remove-CMDeviceVariable [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -ResourceId  -VariableName  [-WhatIf] []

Description

The Remove-CMDeviceVariable cmdlet removes a variable defined for a device.

Examples

Example 1: Remove a device variable

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

This command removes the device variable ServerIPAddress from the device gateway-server.contoso.com.

Required Parameters

-Device

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

Type:IResultObject
Aliases:InputObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-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
-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 that this cmdlet removes.

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
-Force

Forces the command to run without asking for user confirmation.

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
-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