2 Proven Ways to Export Windows 365 Cloud PC Names

Prajwal Desai
Posted by Prajwal Desai
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:

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
Export Windows 365 Cloud PC Names using PowerShell
Export Windows 365 Cloud PC Names using PowerShell

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
Export Windows 365 Cloud PC Names using PowerShell
Export Windows 365 Cloud PC Names using PowerShell

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.

Export Windows 365 Cloud PC Names using PowerShell
Export Windows 365 Cloud PC Names using 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.

Export Windows 365 Cloud PC Names using PowerShell
Export Windows 365 Cloud PC Names using PowerShell

To provide the consent, check box the option “Consent on behalf of your organization” and click Accept.

Export Windows 365 Cloud PC Names using PowerShell
Export Windows 365 Cloud PC Names using PowerShell

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.

Manually Export Cloud PC Names
Manually Export Cloud PC Names

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.

Manually Export Cloud PC Names
Manually Export Cloud PC Names

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.

Manually Export Cloud PC Names
Manually Export Cloud PC Names

Also Read

Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
Leave a comment