2 Proven Ways to Export Windows 365 Cloud PC Names
In this article, I will show you two ways to export Windows 365 Cloud PC names. You can export all the Cloud PC names on your tenant using a PowerShell script, or you can manually export them from the Intune admin centre.
If you’re an organization running multiple Cloud PCs, you may want to generate a list of existing Cloud PCs in your Intune tenant. When you export the Cloud PCs, you get a lot of other details about the Cloud PC. These details have been covered in the guide on exporting Cloud PC details.
There are two ways to export the Cloud PC names, and they are listed below:
- Export Cloud PCs names using PowerShell Script
- Manually export Cloud PC names from Intune admin center
Out of the above listed methods, exporting the cloud PC names from Intune admin center is much easier than using a PowerShell script. We will go through each of these methods in detail. Make sure you have provisioned the Cloud PCs in your Intune tenant and licenses are assigned to the Cloud PCs.
If you are new to the concept of Cloud PCs and want to learn the basics, I recommend the below guides:
- Quickly Reprovision a Cloud PC | Windows 365 | Intune Portal
- How to Assign Windows 365 License to Cloud PC User
- Troubleshoot Cloud PC Connection Errors
- Enable Cloud PC Local Admin Access to User in Windows 365
- How To End Grace Period for Cloud PCs in Windows 365
Export Windows 365 Cloud PC Names using PowerShell
Using PowerShell and Graph API, you can export Cloud PC names to a .csv file. There are a series of steps that you must follow before you can export the Cloud PC names. I am going to run the below PowerShell commands on my Configuration Manager server. In your case, it could be a laptop that you use for work.
Using the Install-Module cmdlet is the preferred installation method for the Microsoft Graph PowerShell module. Launch the PowerShell and run the below command to install Microsoft Graph module.
Install-Module Microsoft.Graph -Scope CurrentUser
Run the below command to verify if the Microsoft Graph module is installed successfully. After running the below command, the output should include the Graph API version, which is 1.27.0 in this case.
Get-InstalledModule Microsoft.Graph
We will use the below PowerShell script provided by Microsoft to export Cloud PC names. To accomplish that, copy the below script and paste it into the Notepad. Save the file as “GetCloudPCNames.ps1” in a location of your choice.
param( [Parameter(Mandatory)] [string]$Output ) Select-MgProfile -Name "beta" Connect-MgGraph -Scopes "CloudPC.Read.All" $CloudPCs = Get-MgDeviceManagementVirtualEndpointCloudPC -Property "DisplayName" $DisplayNames = $CloudPCs | Select -ExpandProperty DisplayName Write-Output $DisplayNames $Outarray = @() foreach ( $Name in $DisplayNames ) { $Outarray += New-Object PsObject -property @{ 'DisplayName' = $Name } } $Outarray | Export-Csv -Path $Output -NoTypeInformation Disconnect-MgGraph
In the file explorer, navigate to your file location. Right-click on the GetCloudPCNames.ps1 file and select Run with PowerShell.
A PowerShell window will pop-up asking you to enter the output. In the window, type “CloudPCNames.csv” and then press enter. When the authentication window pops up, sign in with the same account you used to access the Cloud PC.
To provide the consent, check box the option “Consent on behalf of your organization” and click Accept.
When the PowerShell window closes, the script has finished running. Go back to the location of your script and there will be a file called “CloudPCNames.csv“. This file includes the list of all Cloud PC names on your tenant.
Manually Export Cloud PC Names from Intune Admin Center
If you are looking to export all the Cloud PC names, you can do that from the Intune admin center. There is also an option to select the columns before you export the details of the Cloud PCs.
The following steps can be used to export the Windows 365 Cloud PC names in Intune:
- Sign in to the Microsoft Intune admin center
- Select Devices > Windows 365 > All Cloud PCs.
- Click on Columns and select Device Name.
- Click the Export option to export all the Cloud PC names to a .csv file.
When you export the Cloud PC details, a lot of details are exported which are not necessary in all cases. The following information is exported about the Cloud PC when you use the export option:
- Device name
- Provisioning policy
- Image
- Azure network connection
- PC type
- Status
- User
- Encryption Status
- Date Modified
- Third-party connector
To export only the Cloud PC names, click the Columns option and from the list of columns, uncheck all options except Device Name. By doing this, you are displaying only Device name column for Cloud PCs and the same columns will be exported to .csv file.
Do you see the change now? You only see the device name column for Cloud PC in the console. After selecting the desired columns, click on the Export option.
You’ll now be asked, “This will export all data in this view to a comma-separated values (.csv) file. Do you want to continue?“. Select Download. This will download a .csv file to your computer. You can open the .csv file using Microsoft Excel application and in this file you’ll find the list of all the Windows 365 Cloud PC names.