Fix Unknown Power State for vmWare hosted VMs in XenDesktop 7.x

by Stan Czerno September 2, 2017 11:57 CST

Recently we had an air conditioner failure in our Server Room, which made the server room's temperature rise. Because of this, the shared storage and other servers automatically shutdown due to high heat conditions, which had an adverse affect on many VMs. 

Other than the VMs going down rather ungracefully, once they came back up, the vmWare IDs did not match the XenDesktop (IDsHostedMachineId) . I found a few examples of how to correct this, even some scripts to do it in bulk, but none of them seem to work correctly. So I borrowed some of the code example and created this one. The Broker Service on each Delivery Controller needs to be restarted for the data to be refreshed.

This will work for SCVMM and Hyper-V as well.


Link to file: CheckforUnknownPowerStateandFix.ps1

Tags: , , ,

Catergories: Citrix | XenDesktop | Powershell

Comments are closed