Overview#
Windows 365 Cloud PCs integrate directly with Microsoft Intune, which means device inventory and health information collected through Intune is also available for Cloud PCs through Microsoft Graph. Among those inventory attributes are the total size of the OS disk and the currently available free space.
Using the Microsoft Graph deviceManagement/managedDevices endpoint, we can retrieve storage metrics for Cloud PCs and use them for reporting, monitoring, or automation scenarios. This provides a simple way to understand Cloud PC disk utilization across your tenant with PowerShell and the Microsoft Graph SDK.
In this post, we’ll look at two approaches for identifying Cloud PCs in Microsoft Graph:
- Filtering Intune
managedDevicesdirectly using the Cloud PC device model - Correlating Windows 365 Cloud PC objects with their associated Intune
managedDevice
We’ll also walk through a PowerShell example that calculates total storage, free storage, and percent free space for every Cloud PC in your tenant using the Microsoft Graph PowerShell SDK.
Microsoft Graph managedDevices#
Because every Cloud PC is also an Intune-enrolled Windows device, the Microsoft Intune device-inventory pipeline carries OS disk values for
each one. Graph exposes these via the managedDevice resource, specifically two read-only Int64 properties inherited by windowsManagedDevice:
| Property | Type | Meaning |
|---|---|---|
totalStorageSpaceInBytes | Int64 | Total OS volume capacity |
freeStorageSpaceInBytes | Int64 | Free space on the OS volume |
Both come straight off the device at Intune check-in time and apply to the
system drive (typically C:). They are documented on the shared
managedDevice resource type
and are inherited by
windowsManagedDevice.
The cloudPC resource itself does not carry these properties — you must
join across.
Filtering managedDevices to the Cloud PC fleet#
Cloud PCs are not flagged with a dedicated managedDeviceOwnerType value;
they appear as ordinary company-owned Windows devices. Currently, we can distriguish Cloud PCs using the following methods:
Managed Device
modelproperty containsCloud PC: Every W365 SKU’s model string starts with “Cloud PC " (e.g.Cloud PC Enterprise 2vCPU/4GB/64GB). This is the simplest one-shot filter and is what the Intune admin center itself uses.The Microsoft Graph
deviceManagement/managedDevicesendpoint returns all managed devices and properties for total storage (totalStorageSpaceInBytes) and free space (freeStorageSpaceInBytes). It also include ourmodelproperty that we can filter against.In my example, using the Microsoft Graph PowerShell SDK, I can run,
Get-MgDeviceManagementManagedDevice -All -Property * | Where-Object { $_.Model -like 'Cloud PC*'} | Select-Object Id, Total*, Free*, Modelin my tenant which displays my current Cloud PC’s and all the properties I will need:Id TotalStorageSpaceInBytes FreeStorageSpaceInBytes Model -- ------------------------ ----------------------- ----- 3c787e74-e2d2-4fce-9cd1-650b5e06a4ee 136844410880 95460261888 Cloud PC Frontline 4vCPU/16GB/12… 22bb1414-aa07-4d5d-8d5d-a7af104d1dae 136844410880 99693363200 Cloud PC Frontline Shared 4vCPU/… cc802f52-f11e-43df-8393-565439c1a7c6 274283364352 222822400000 Cloud PC Enterprise 8vCPU/32GB/2…Match Cloud PCs from
/deviceManagement/virtualEndpoint/cloudPCstoGet-MgDeviceManagementManagedDevice: Another way to get Cloud PCs is to use the/deviceManagement/virtualEndpoint/cloudPCsGraph endpoint which will give us a list of Cloud PCs like below:
{
"id": "95194d88-cec5-4b65-af62-26dbd1814364",
"displayName": "W365-Frontline-Dedicated - Bradley Wyatt",
"imageDisplayName": "Windows 11 Enterprise + Microsoft 365 Apps 25H2",
"provisioningPolicyId": "27d60840-6888-44b9-aefd-e5f8f1a92add",
"provisioningPolicyName": "W365-Frontline-Dedicated",
"onPremisesConnectionName": "",
"servicePlanId": "dd3801e2-4aa1-4b16-a44b-243e55497584",
"servicePlanName": "Cloud PC Frontline 4vCPU/16GB/128GB",
"userPrincipalName": "brad@windowsfromanywhere.com",
"lastModifiedDateTime": "2026-05-15T00:01:02Z",
"managedDeviceId": "3c787e74-e2d2-4fce-9cd1-650b5e06a4ee",
"managedDeviceName": "CFD-brad-HNFI4",
"aadDeviceId": "db5913da-e353-49d7-9570-0f2d7f13b51a",
"gracePeriodEndDateTime": null,
"provisioningType": "shared"
}But you may have noticed that this endpoint does not include any storage information, therefore you will need to iterate through each item and match the managedDeviceId value to Id from the deviceManagement/managedDevices endpoint.
PowerShell example using Microsoft.Graph SDK#
The following PowerShell script lists every Cloud PC in the tenant with its free / total storage in GB and a percent-free figure. It uses the Microsoft Graph PowerShell SDK and the v1.0 endpoint.
# Requires: Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes 'DeviceManagementManagedDevices.Read.All'
# Pull every managedDevice whose model starts with "Cloud PC"
$cpcs = Get-MgDeviceManagementManagedDevice -All -Property * | Where-Object { $_.Model -like 'Cloud PC*' }
$cpcs | ForEach-Object {
$totalGB = [math]::Round($_.TotalStorageSpaceInBytes / 1GB, 2)
$freeGB = [math]::Round($_.FreeStorageSpaceInBytes / 1GB, 2)
$pctFree = if ($totalGB -gt 0) { [math]::Round(($freeGB / $totalGB) * 100, 1) } else { 0 }
[pscustomobject]@{
DeviceName = $_.DeviceName
UPN = $_.UserPrincipalName
Model = $_.Model
TotalGB = $totalGB
FreeGB = $freeGB
PctFree = $pctFree
LastSyncUtc = $_.LastSyncDateTime
}
} | Sort-Object PctFree | Format-Table -AutoSizeResults would look like the following:
DeviceName UPN Model TotalGB FreeGB PctFree LastSyncUtc
---------- --- ----- ------- ------ ------- -----------
CFD-brad-HNFI4 brad@windowsfromanywhere.com Cloud PC Frontline 4vCPU/16GB/128GB 127.45 88.90 69.80 5/14/2026 7:58:34 PM
CFS-Q4L0XGCNSTR Cloud PC Frontline Shared 4vCPU/16GB/128GB 127.45 92.85 72.90 5/15/2026 4:42:12 AM
CPC-brad-VO992 brad@windowsfromanywhere.com Cloud PC Enterprise 8vCPU/32GB/256GB 255.45 207.52 81.20 5/14/2026 8:01:37 PMHow fresh is the data?#
The lastSyncDateTime column is critical: a Cloud PC that hasn’t checked in for a week will show stale storage values. Filter or flag rows whose last sync is older than the customer’s reporting tolerance.
| Path | Freshness | Notes |
|---|---|---|
Graph managedDevices | Last Intune check-in (~8 hr default for Windows) | Force a Sync to refresh; honour lastSyncDateTime |
What about Flex Shared Cloud PCs with User Experience Sync?#
When a user with User Experience Sync (UES) signs into a Shared Cloud PC, an Azure Managed Disk is quietly attached to the VM and the frxdrvvt kernel-mode minifilter driver redirects access from the user profile path (C:\Users\%username%) to that managed disk. As a result, the user’s primary profile data does not consume space on the Cloud PC’s local OS disk. Only certain excluded caches and device-specific data remain locally stored. Therefore, the above script should yield accurate results regardless of user profile size.
You can read more about how UES works within Windows 365 here
Intune Management Portal#
Another, way to check free storage is to use the Intune Portal. If you go to Devices > Windows and in the Columns you select, “Free Storage” you will see the free storage for all your Windows endpoints. However, at the time of this post you cannot filter against “model” so you will need to export to csv and then perform the filtering there.
The Intune Portal device metrics are also tied to the device’s lastSyncDateTime.
