PSCloudPC 1.0.18 released
PSCloudPC 1.0.18 is out. It adds 11 cmdlets for day-to-day Cloud PC management, such as the audit log, connection history, snapshots and the troubleshooter. It also fixes signing in with a certificate or a device code, and makes deleting and updating policies safer.
Read the breaking changes before you upgrade. The Remove-* cmdlets now ask for confirmation and need the exact name.
Install or upgrade
Install-Module -Name PSCloudPC -RequiredVersion 1.0.18
If the module is already installed:
Update-Module -Name PSCloudPC
PSCloudPC requires PowerShell 7.2 or later. The Microsoft.Graph.Authentication module is installed automatically. See Installation for details.
Breaking changes
Remove cmdlets need the exact name and ask for confirmation
Remove-CPCAzureNetworkConnection, Remove-CPCCustomImage, Remove-CPCProvisioningPolicy and Remove-CPCUserSettingsPolicy only delete an object whose name matches exactly. Upper and lower case don't matter. Before, part of the name was enough, so the wrong object could be deleted. When no object or more than one object matches, nothing is deleted.
These cmdlets now ask for confirmation.
What to do: pass the full name. Add -Confirm:$false when you run them in a script.
Remove-CPCProvisioningPolicy -Name "W365-Finance-Policy" -Confirm:$false
Remove-CPCCustomImage has a new -Version parameter for images that share a name:
Remove-CPCCustomImage -Name "W365-Win11-Base" -Version "1.0.1"
No output from two cmdlets
Update-CPCUserSettingsPolicy and Set-CPCCrossRegionDisasterRecovery no longer return the policy.
What to do: if your script uses the output, run Get-CPCUserSettingsPolicy after the change.
Update-CPCUserSettingsPolicy -Name "W365-Finance-Settings" -LocalAdminEnabled $false
Get-CPCUserSettingsPolicy -Name "W365-Finance-Settings"
Region required for cross-region disaster recovery
Set-CPCCrossRegionDisasterRecovery now requires -RegionName and -RegionGroup when you turn on crossRegion or premium disaster recovery.
Set-CPCCrossRegionDisasterRecovery -Name "W365-Finance-Settings" -DisasterRecoveryType crossRegion -RegionName "northeurope" -RegionGroup "europeUnion"
Deprecated parameters
The -DisableRestartPrompts and -SelfServiceEnabled parameters of Update-CPCUserSettingsPolicy have no effect any more, because Microsoft retired these settings. They show a warning and will be removed in a later version.
New cmdlets
| Cmdlet | What it does |
|---|---|
Get-CPCAuditEvent | Shows the Windows 365 audit log |
Get-CPCConnectivityHistory | Shows the connection history of a Cloud PC |
Get-CPCRealTimeConnectionStatus | Shows whether a user is signed in to a Cloud PC right now |
Get-CPCRemoteActionResult | Shows the remote actions run on a Cloud PC and their result |
Invoke-CPCChangeUserAccountType | Makes the user of a Cloud PC a standard user or a local administrator (see Known issues) |
Invoke-CPCCreateSnapshot | Creates a restore point of a Cloud PC |
Invoke-CPCPowerOn and Invoke-CPCPowerOff | Start or shut down a Windows 365 Frontline Cloud PC (see Known issues) |
Invoke-CPCRetryPartnerAgentInstallation | Retries a failed partner agent installation on a Cloud PC |
Invoke-CPCTroubleshoot | Runs the Windows 365 troubleshooter on a Cloud PC |
Update-CPCAzureNetworkConnection | Changes an existing Azure network connection |
A few examples. Connect first with Connect-Windows365.
Connect-Windows365
# Show the 25 most recent audit events
Get-CPCAuditEvent -Top 25
# Check whether someone is signed in to a Cloud PC right now
Get-CPCRealTimeConnectionStatus -Name "CPC-adele-AB12C"
# Run the troubleshooter on a Cloud PC
Invoke-CPCTroubleshoot -Name "CPC-adele-AB12C"
# Show the remote actions run on a Cloud PC and their result
Get-CPCRemoteActionResult -Name "CPC-adele-AB12C"
New parameters
Invoke-CPCRestore -SnapshotIdrestores a Cloud PC from a script, without the selection window.Invoke-CPCReprovisionhas new-OsVersionand-UserAccountTypeparameters.Remove-CPCCustomImage -Versionselects one of several images that share a name.
Create a snapshot before a risky change, and restore it later from a script:
Invoke-CPCCreateSnapshot -Name "CPC-adele-AB12C"
# Later: restore the most recent restore point
$snapshot = Get-CPCRestorePoint -Name "CPC-adele-AB12C" |
Sort-Object createdDateTime -Descending |
Select-Object -First 1
Invoke-CPCRestore -Name "CPC-adele-AB12C" -SnapshotId $snapshot.id
Reprovision a Cloud PC with Windows 11 and a standard user account:
Invoke-CPCReprovision -Name "CPC-adele-AB12C" -OsVersion windows11 -UserAccountType standardUser
Other changes
New-CPCAzureNetworkConnectionuses-Namelike the other cmdlets.-DisplayNamestill works.Get-CPCServicePlanalso returns the provisioning type of each plan.- Error messages now include the reason given by Microsoft Graph, which makes failures easier to solve.
- The help of every cmdlet is complete. Each parameter has a description, and wrong descriptions and permissions are corrected.
Most important fixes
Connect-Windows365: signing in with a certificate didn't work, and signing in with a device code didn't ask for the Cloud PC permissions.Get-CloudPCdidn't return all Cloud PCs in larger tenants.- Some cmdlets reported success while the change had failed.
Update-CPCUserSettingsPolicyandSet-CPCCrossRegionDisasterRecoveryreset every setting you didn't pass to its default value.Set-CPCCrossRegionDisasterRecoveryalso couldn't turn disaster recovery off.Set-CPCProvisioningPolicyAssignmentandSet-CPCUserSettingsPolicyAssignmentfailed when the group was already assigned.New-CPCProvisioningPolicycouldn't create a hybrid join policy.New-CPCAzureNetworkConnectionsent the AD domain password in a form that Windows 365 can't use.New-CPCCustomImagecreated images without a name.Get-CPCRestorePointreturned no restore points.- When a name isn't found or a value isn't valid, the cmdlet now stops before it changes anything, also with
-ErrorAction SilentlyContinue.
The full list is in the changelog.
Known issues
Invoke-CPCChangeUserAccountTypedoesn't work yet: Microsoft Graph returns an error (#104).Invoke-CPCPowerOnandInvoke-CPCPowerOffhaven't been tested on a Frontline Cloud PC yet (#107).- Microsoft removes the AD domain user name and password of Azure network connections on December 31, 2026.
New-CPCAzureNetworkConnectionandUpdate-CPCAzureNetworkConnectionwill be updated before then (#175).
More information
Found a problem? Open an issue.

