Skip to main content

Restore-CloudPC

Restores a Windows 365 Cloud PC from a restore point snapshot.

Description

Calls Microsoft Graph v1.0 https://graph.microsoft.com/v1.0/deviceManagement/virtualEndpoint/cloudPCs/{id}/restore to restore a Cloud PC from a snapshot ID.

This is a destructive asynchronous service action. Graph returns 204 No Content when the restore request is accepted. Use -WhatIf to preview the request before restoring a device.

Requires the CloudPC.ReadWrite.All scope; the cmdlet automatically reauthenticates via Connect-CloudPC if the current Graph session does not already have it.

Syntax


Restore-CloudPC -CloudPC <Object> -SnapshotId <string> [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-CloudPC -Id <string> -SnapshotId <string> [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-CloudPC -Snapshot <Object> [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters

NameTypeRequiredAliasesDescription
CloudPCObjectYesA WindowsCloudPC.CloudPC object returned by Get-CloudPC, or an exact
Cloud PC name, Cloud PC ID, managed device ID, Azure AD device ID, or
assigned user principal name. Accepts pipeline input.
ForceSwitchParameterNoSuppress confirmation prompts. Equivalent to -Confirm:$false.
IdStringYesCloudPcIdThe Cloud PC ID when you do not have a CloudPC object available.
PassThruSwitchParameterNoEmit a WindowsCloudPC.RestoreResult object describing the request.
SnapshotObjectYesA WindowsCloudPC.Snapshot object returned by Get-CloudPCSnapshot.
The CloudPcId and SnapshotId properties are used for the restore request.
SnapshotIdStringYesThe snapshot ID to restore from when the Cloud PC is supplied separately.

Output

CloudPcId : 00000000-0000-0000-0000-000000000000
CloudPcName : CPC-USER-01
SnapshotId : A00009UV000_00000000-0000-0000-0000-000000000000
Status : Accepted
RequestedAt : 6/19/2026 2:15:00 PM
ErrorMessage :

Graph endpoints

/v1.0/deviceManagement/virtualEndpoint/cloudPCs/{id}/restore

Example 1

Get-CloudPCSnapshot -CloudPC 'CPC-USER-01' |
Select-Object -First 1 |
Restore-CloudPC -WhatIf

Example 2

Restore-CloudPC -CloudPC 'CPC-USER-01' -SnapshotId '<snapshot-id>' -Force -PassThru

Example 3

Restore-CloudPC -Id '<cloud-pc-id>' -SnapshotId '<snapshot-id>' -PassThru

Source

View Restore-CloudPC.ps1 on GitHub