Get-CMDeviceActionState

Gets the state of a device action.

Syntax

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

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.

Required Parameters

-Id

Specifies the ID of a device.

Type:Int32
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
Aliases:Device
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Action

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

  • PinReset
  • BypassActivationLock
  • RequestNewActivationLockCode
  • Unknown
Type:DeviceActionType
Parameter Sets:Lock, PinReset, BypassActivationLock, RequestNewActivationLockCode
Required:False
Position:1
Default value:None
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
-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
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
-Name

Specifies the name of a device.

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

Outputs

IResultObject#SMS_DeviceAction