Get-CMDeviceActionState

SYNOPSIS

Gets the state of a device action.

SYNTAX

ByName (Default)

Get-CMDeviceActionState [[-Action] <DeviceActionType>] [[-Name] <String>] [-Fast] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [<CommonParameters>]

ById

Get-CMDeviceActionState [[-Action] <DeviceActionType>] [-Id] <Int32> [-Fast] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [<CommonParameters>]

ByValue

Get-CMDeviceActionState [[-Action] <DeviceActionType>] [-InputObject] <IResultObject> [-Fast]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]

DESCRIPTION

The Get-CMDeviceActionState cmdlet gets the state of an action initiated on a mobile device by using the Invoke-CMDeviceAction cmdlet.

EXAMPLES

Example 1: Get the state of a device action using the pipeline

PS C:\> Get-CMDevice -Name "WindowsPhone0402" | Get-CMDeviceActionState -Action PinReset

This command gets the device object named WindowsPhone0402 and uses the pipeline operator to pass the object to Get-CMDeviceActionState, which gets the state of the PIN reset action on the device.

Example 2: Get the state of a lock action

PS C:\> Get-CMDeviceActionState -Name "WindowsPhone0401" -Action Lock

This command gets the state of the lock action on the device named WindowsPhone0401.

PARAMETERS

-Action

Specifies the action for which you want status. Valid values are:

  • Lock
  • PinReset
  • BypassActivationLock
  • RequestNewActivationLockCode
  • Unknown
Type: DeviceActionType
Parameter Sets: (All)
Aliases: 
Accepted values: Lock, PinReset, BypassActivationLock, RequestNewActivationLockCode

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

-Fast

Indicates that the cmdlet does not automatically refresh lazy properties.

Lazy properties contain values that are relatively inefficient to retrieve which can cause additional network traffic and decrease cmdlet performance. If lazy properties are not used, this parameter should be specified.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

-Id

Specifies the ID of a device.

Type: Int32
Parameter Sets: ById
Aliases: ResourceId

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

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

Type: IResultObject
Parameter Sets: ByValue
Aliases: Device

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

Specifies the name of a device.

Type: String
Parameter Sets: ByName
Aliases: 

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

IResultObject#SMS_DeviceAction

NOTES

Get-CMDevice

Invoke-CMDeviceAction