Skip to main content

PSCloudPC 1.0.18 released

· 6 min read
Stefan Dingemanse
Stefan Dingemanse
Niels Kok
Niels Kok

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​

CmdletWhat it does
Get-CPCAuditEventShows the Windows 365 audit log
Get-CPCConnectivityHistoryShows the connection history of a Cloud PC
Get-CPCRealTimeConnectionStatusShows whether a user is signed in to a Cloud PC right now
Get-CPCRemoteActionResultShows the remote actions run on a Cloud PC and their result
Invoke-CPCChangeUserAccountTypeMakes the user of a Cloud PC a standard user or a local administrator (see Known issues)
Invoke-CPCCreateSnapshotCreates a restore point of a Cloud PC
Invoke-CPCPowerOn and Invoke-CPCPowerOffStart or shut down a Windows 365 Frontline Cloud PC (see Known issues)
Invoke-CPCRetryPartnerAgentInstallationRetries a failed partner agent installation on a Cloud PC
Invoke-CPCTroubleshootRuns the Windows 365 troubleshooter on a Cloud PC
Update-CPCAzureNetworkConnectionChanges 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 -SnapshotId restores a Cloud PC from a script, without the selection window.
  • Invoke-CPCReprovision has new -OsVersion and -UserAccountType parameters.
  • Remove-CPCCustomImage -Version selects 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-CPCAzureNetworkConnection uses -Name like the other cmdlets. -DisplayName still works.
  • Get-CPCServicePlan also 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-CloudPC didn't return all Cloud PCs in larger tenants.
  • Some cmdlets reported success while the change had failed.
  • Update-CPCUserSettingsPolicy and Set-CPCCrossRegionDisasterRecovery reset every setting you didn't pass to its default value. Set-CPCCrossRegionDisasterRecovery also couldn't turn disaster recovery off.
  • Set-CPCProvisioningPolicyAssignment and Set-CPCUserSettingsPolicyAssignment failed when the group was already assigned.
  • New-CPCProvisioningPolicy couldn't create a hybrid join policy.
  • New-CPCAzureNetworkConnection sent the AD domain password in a form that Windows 365 can't use.
  • New-CPCCustomImage created images without a name.
  • Get-CPCRestorePoint returned 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-CPCChangeUserAccountType doesn't work yet: Microsoft Graph returns an error (#104).
  • Invoke-CPCPowerOn and Invoke-CPCPowerOff haven'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-CPCAzureNetworkConnection and Update-CPCAzureNetworkConnection will be updated before then (#175).

More information​

Found a problem? Open an issue.