At one of my current projects we’ve encountered the situation were people had non domain joined machines (corporate owned), those machines were deployed via an external deployment mechanism but we discovered that a lot of the machines had duplicate hostnames. Not a big deal as the machines weren’t domain joined but whilst the customer wanted to use Intune to manage these devices it could become complicated as Intune displays the hostname of the machine.
These machines are being used to access the centralized published desktop via XenApp 6.5 so all the connected machines would display their hostname and current user in the XenApp management console. To get the combination of client hostname and username from the Citrix XenApp datastore I wrote a small Powershell script based on the Citrix XenApp 6.5 SDK which includes remoting:
After running this script I would get a text file containing the username and clientname from all active ICA sessions on the XenApp farm. The format was displayed as:
|ClientName : LT001
AccountName : Contoso\k.baggerman
I imported the output from the powershell script (text file) into Excel and deleted the empty rows by using the following instruction:
- Select your data
- Press F5
This opens “Go to” dialog in Excel. Now hit on that “select” button.
- From “select special” screen, select “Blanks” (shown aside)
Now, all the blank cells will be selected.
- Just press CTRL and Minus sign (-)
- Select “shift cells up” or “entire row” as needed.
As the empty rows were removed now I did a formatting on the excel sheet to import the data as two separate rows. With some help of Conditional formatting I was able to display the duplicate records and create a list of duplicate systems including the users that used that machine so we were able to pinpoint the users with machines with a duplicate name.
Latest posts by Kees Baggerman (see all)
- Making sure your Citrix Desktops are utilized in 35 lines of PoSH - April 13, 2017
- Nutanix VM Inventory Script using powershell - February 23, 2017
- AOS 5.0: Performance improvements in Nutanix AHV - January 3, 2017
- Nutanix Guest Tools: Unattended installation - December 23, 2016
- AOS 5.0 released, XenServer TP in full effect! - December 22, 2016