Citrix XenApp/XenDesktop 7.8+ Documentation Script Update Version 2.15
I am in the process of creating some XenApp/XenDesktop application scripts the community has asked me to create. One is fairly simple, or so I thought.
The request was simple, for each application, list the Delivery Group that provides that application. For each Delivery Group, list each Machine Catalog that provides machines for the Delivery Group. Since I already have that code in the full documentation script, I thought it wouldn’t take much to get this simple script done. So I created three XenApp 7.17 Machine Catalogs, a Delivery Group with a machine from all three Machine Catalogs, published Calculator and ran my little script. Much to my surprise, only one Machine Catalog was listed. That took me on a journey to find the bug. After a brief email thread with my main PowerShell mentor, MBS, and digging into the help text for Sort-Object and its -Unique switch, I found out I needed to add a name property to the statement. That led me to look at every use of Sort-Object with -Unique in both XenApp/XenDesktop 7.xx documentation scripts. Which meant I had to build additional Machine Catalogs, Delivery Groups, Tags, Applications, and more to test as many scenarios as I could. That led me to find many issues with Text output and a wrong variable used for Excluded Users in the Desktop Entitlement section.
The fact that getting all the Machine Catalogs that make up a Delivery Group has been broken since the initial V1 script was released three years ago either means no one uses multiple Machine Catalogs per Delivery Group or no one verified the data in the report. Either way, this is now fixed thanks to a community request for another script.
While I was going through all this, a Citrite on the XenDesktop team reminded me that Get-BrokerDesktop was deprecated and I shouldn’t be using it and I should use Get-BrokerMachine in its place. Fortunately, the deprecated cmdlet was only used four times in each script making it a simple task to replace it.
You can always find the most current script by going to http://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/
Read the entire article here, Citrix XenApp/XenDesktop 7.8+ Documentation Script Update Version 2.15
Via Carl Webster