PowerTip: Use PowerShell to Find Running Virtual Machines

PowerTip: Use PowerShell to Find Running Virtual Machines

  • Comments 2
  • Likes

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' }\

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • post is good !!!

  • How to extend this example to start a vm if it is NOT running? Sequence of "starts" is unimportant for the inquiry. :) TIA.