May 10th, 2013

PowerTip: Use PowerShell to Find Running Virtual Machines

Doctor Scripto
Scripter

Summary: Sean Kearney explains how to use Windows PowerShell to find running virtual machines.

Hey, Scripting Guy! Question How can I find a list of virtual machines on my computer that is running Windows Server 2012 with Hyper-V?

Hey, Scripting Guy! Answer Use the Get-VM cmdlet and filter on the State property:

Get-VM | Where { $_.State -eq ‘Running’ }

Or if you need to check a remote computer:

Get-VM -computername RemoteHyperVServer | Where { $_.State -eq ‘Running’ }\

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.