Get-CMDeviceVariable

Gets device variables of a Configuration Manager device.

Syntax

Get-CMDeviceVariable
   -InputObject <IResultObject>
   [-VariableName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDeviceVariable
   -DeviceName <String>
   [-VariableName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDeviceVariable
   -ResourceId <String>
   [-VariableName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMDeviceVariable cmdlet gets device variables of a Configuration Manager device.

Individual devices have device variables. Task sequence processing uses device variables.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get a variable value by using its name

PS XYZ:\> Get-CMDeviceVariable -DeviceName "Computer073" -VariableName "HostDrive"

This command gets the value of the variable named HostDrive for the specified computer.

Parameters

-DeviceName

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

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceId

Specifies a Systems Management Server (SMS) ID.

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

-VariableName

Specifies the name of the device variable.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]

IResultObject