Get-CMDeviceActionState

Gets the state of a device action.

Syntax

Get-CMDeviceActionState
   [[-Action] <DeviceActionType>]
   [-Id] <Int32>
   [-Fast]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDeviceActionState
   [[-Action] <DeviceActionType>]
   [-InputObject] <IResultObject>
   [-Fast]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDeviceActionState
   [[-Action] <DeviceActionType>]
   [[-Name] <String>]
   [-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.

Required Parameters

-Id

Specifies the ID of a device.

Type:Int32
Aliases:ResourceId
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
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
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
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a device.

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

Outputs

IResultObject#SMS_DeviceAction