Wednesday, February 24, 2016

Add Multiple VMs to Inventory

I was recently in a situation where I had to remount and NFS datastore to my ESXi hosts due to an IP address change.  After shutting down all the VMs in that datastore, I chose the entire group and right-click > remove from inventory.  After unmounting the datastore I re-added it again with the new IP address.  Now I had a datastore but it showed no VMs.  When browsing the contents of the datastore I was able to see all the machines.  However, I had no interest in going into each VM folder, and adding each one separately to the inventory.  

If found a Powershell (needs PowerCLI) script that does it quite well:  

One note regarding the script on the site, for some reason instead of actual quotation marks (" ") instead the script has "

You will need to replace each one prior to running the script.

Wednesday, January 20, 2016

Installation Hangs on Terminal Server 2003

Our environment still has 2 Server 2003 Terminal Servers supporting legacy applications.  I have recently discovered the solution that solves an issue we have been having for a very long time.  I first discovered the issue when trying to update VMware Tools.  The install would hang in the middle and then time out after about 15 minutes.  After some testing I notice the issue affects any installation attempt.  VMware support didn't really solve the issue, but we discovered that running an installation right after login would complete successfully.

This week after searching once again I found a few blog posts that claim the source of the issue is HP Printer drivers and especially HP Universal Print Drivers.

1) Opening Terminal Server registry propogation window. (aka: Installing software in windows takes forever)

2) Terminal Server 2003 msiexec high cpu usage, hp upd

3) High CPU usage in MSIExec due to enumeration of print GUIDs in HKU\.Default\Software

Before following the suggestions in these posts to remove HP registry entries, I first took the server offline and removed all printers.  Then, within the Printer and Faxes window, right-click and choose Server Properties.  Click on the Ports tab and remove any unnecessary printers.  Then, click on the Drivers tab and remove any old or unnecessary drivers.  If you have a policy that maps printers for users, you can safely remove all the drivers and ports, as they will get recreated upon user login.