Skip to main content

Get-CPCRemoteActionResult

SYNOPSIS​

Retrieves the remote action results for a specific Cloud PC

SYNTAX​

Name (Default)​

Get-CPCRemoteActionResult -Name <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Id​

Get-CPCRemoteActionResult -CloudPCId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

The function retrieves the results of remote actions (such as reboot, reprovision, resize, restore, rename, and troubleshoot) that have been executed on a specific Cloud PC using the Microsoft Graph beta API.

Each result includes the action name, its current state (pending, canceled, active, done, failed, or notSupported), timestamps for when the action was initiated and last updated, and additional status details.

This is useful for verifying that a triggered action completed successfully, diagnosing failed remote actions, and auditing the history of operations on a Cloud PC without relying on audit events.

You can identify the target Cloud PC by its managed device name (default) or by providing the Cloud PC object ID directly via -CloudPCId.

EXAMPLES​

EXAMPLE 1​

Get-CPCRemoteActionResult -Name "CPC-User-XXXX"

EXAMPLE 2​

Get-CPCRemoteActionResult -CloudPCId "4b5ad5e0-6a0b-4ffc-818d-36bb23cf4dbd"

EXAMPLE 3​

Get-CPCRemoteActionResult -Name "CPC-User-XXXX" | Where-Object { $_.actionState -eq 'failed' }

PARAMETERS​

-Name​

The managed device name of the Cloud PC. Use Get-CloudPC to find Cloud PC names. Mutually exclusive with -CloudPCId.

Type: String
Parameter Sets: Name
Aliases:

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

-CloudPCId​

The object ID (GUID) of the Cloud PC. Use Get-CloudPC to find Cloud PC IDs. Mutually exclusive with -Name.

Type: String
Parameter Sets: Id
Aliases:

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

-ProgressAction​

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
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.

INPUTS​

OUTPUTS​

NOTES​

Requires CloudPC.Read.All or CloudPC.ReadWrite.All permission (delegated or application). This function uses the Microsoft Graph beta endpoint. API reference: https://learn.microsoft.com/en-us/graph/api/cloudpc-retrievecloudpcremoteactionresults