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)
- Updated: VM Reporting Script for Nutanix AHV with Powershell - April 8, 2019
- How to add a CD-ROM drive and mount an ISO file via powershell to an AHV-hosted VM - March 27, 2019
- How to add a nic via powershell to an AHV-hosted VM - March 25, 2019
- VM Reporting Script for Nutanix AHV with Powershell - March 19, 2019
- Reporting vGPU enabled VMs on AHV - March 13, 2019