Get a list of Desktop names in XenDesktop

8.6k Views Asked by At

I've done this but its not giving me what I want.

Get-BrokerDesktop -MaxRecordCount 1000 | select "DesktopGroupName" | Export-Csv c:\dektop_list

I'm only looking to get Delivery Groups that publish desktops. If its a published app delivery group I dont want it included in the list.

Thanks in advance.

   $DG = Get-BrokerDesktopGroup
   foreach($item in $DG)
   {
      if (DeliveryType = "DesktopsOnly")
        {
            Add-Content C:\dektop_list.csv
        }
        else
        {
            Add-Content c:\application_delivery.csv
        }
        }

I get an error on this that says"DeliveryType : The term 'DeliveryType' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."

3

There are 3 best solutions below

0
On

This command will list Published Desktops:

Get-BrokerEntitlementPolicyRule -Property Name, PublishedName

0
On

Here is the final command $DG = Get-BrokerDesktopGroup -MaxRecordCount 10000 | Where-Object {$.DeliveryType -like "DesktopsOnly" -or $.DeliveryType -like "DesktopsAndApps" } | Select-Object "PublishedName"

0
On

I've scouted around for the command to list the actual name used for the desktop as published in the web portal. Albeit such commands such as:

Get-BrokerDesktopGroup | ? {$_.DeliveryType -match "Desktops"  } | Select -Property Name, PublishedName

or

Get-BrokerDesktop | select DesktopGroupName, AssociatedUserNames | ft -AutoSize

can be used to list the various object names assigned to the delivery group, I have not found anything that shows the published name shown in the storefront web portal.

Nevertheless, hopefully the above may suffice for some of you.

Enjoy,

Porky