Reprovision/Restore Windows 365 Devices

This blog is about showing another example of our Powershell module called PSCloudPC. The example is about Reprovision/Restore Windows 365 devices. My other post is about deploying Windows 365 via Powershell.

Firstly, download and install the module. You can do so using the following command:

Install-Module -Name PSCloudPC

After that, import the module:

Import-Module -Name PSCloudPC

We are now ready to connect to Windows 365 via Powershell. Use this command to connect to Windows 365:

Connect-Windows365 -TenantID YOURTENANT.onmicrosoft.com

Check whether you are connected with this command: (You can also see the Organization Settings of your Windows 365 tenant)

Get-CPCOrganizationSettings

The output looks something like this:

Restore Windows 365 Devices

We start with restoring a Cloud PC to a certain point in time.

But firstly, we need to get the name of the Cloud PC. You can do so by using this command:

Get-CloudPC

In my tenant, it shows only 1 device because I have only 1 Cloud PC for testing purposes. If you have multiple, it will return all Cloud PCs.

Output:

We are using the managedDeviceName. (In the red rectangle)

With this command, you can view all restore points for this CloudPC:

Get-CPCRestorePoint -Name CPC-nt-BS7IRCAG | FT

This is the output: (the column in the rectangle is where you can see the date/time of the restore points)

If we made our decision, we run the restore command:

Invoke-CPCRestore -Name CPC-nt-BS7IRCAG

This gridview is the result:

Select the restore where you want to restore the cloud pc too and click on OK:

After that, the CloudPC is restored to that point in time:

Reprovision a Windows 365 Device

Now, we are reprovisioning a Windows 365 device.

Again, we first need to identify the Windows 365 device.

You can do so by using this command:

Get-CloudPC

Output:

We use the managedDeviceName to invoke the reprovision.

To invoke the reprovision of this Cloud PC, use this command:

Invoke-CPCReprovision -Name CPC-nt-BS7IRCAG

Output in Powershell:

Output in the Portal:

References

PSCloudPC Github Repo
PSCloudPC PSGallery

Leave a Comment