MiMenl
Enthusiast
Enthusiast

Would this help.

 

$VM = get-view –viewtype VirtualMachine –filter @{“Name”=”[vmname]”}

Then 

$VM.Summary.Runtime

Should contain the hostname.

 

It's not code it's spaghetti, and who doesn't like pasta ?
Reply
0 Kudos