November 3rd, 2014

PowerTip: Find Information about Started Virtual Machine

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find detailed information about a started virtual machine.

Hey, Scripting Guy! Question I use the Start-VM cmdlet on my computer running Hyper-V, but how can I use Windows PowerShell
           to find more information about the virtual machine that actually starts?

Hey, Scripting Guy! Answer Use the –PassThru parameter to return a virtual machine information object. Store the returned
           object in a variable, and then use Windows PowerShell to parse that variable. Here is an example:

$vm = Start-VM –name c1 –passthru
$vm

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.