Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 176561

Detecting if a VM if really powered down or powered on?

$
0
0

Hello friends,

 

I am writing some scripts and I (dumb) relied on the value "poweredstate" to determine if a VM is ready for some maintenance. I now found out that if a VM is poweredOn and I begin a Power>Shutdown Guest, the state immediately changes to PoweredOff even as the VM operating system is still shutting down.  This is causing me issues since I want the VM totally powered off.

 

Example:   $powerstate = ((get-vm | where {$_.name -like $variable}).powerstate)

 

Please direct me to a more reliable way to determine if the VM is powered down 'all the way'.

 

Thanks,

 

Scott


Viewing all articles
Browse latest Browse all 176561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>