PowerCLI – Function to Wait for Windows VM to Reboot

Sometimes VMWare Tools will report that a Windows VM is running before all the services are actually running.  I created the following simple PowerCLI function to poll for VMWare Tools status, then wait an extra 5 seconds before returning in order to ensure that all services are, in fact, operational: wait-reboot VMName function wait-reboot { … [Read more…]

VM Network Adapter Connection Check

Sometimes it’s nice to know if your VMs are connected. You’d think it’d be easy to check for network adapter connection state, but it’s not. Not in a pretty fashion that is. The script below will show you which VMs are currently unplugged in table format using PowerCLI: $datacenter = "yourdc" $VMs = (get-vm -location … [Read more…]