Get a list of VMs in Hyper-V

Get a list of all VMs:

Get-VM

Get-WmiObject -Namespace root\virtualization -class msvm_computersystem | select elementname, operationalstatus, processid, name| ft -auto

Windows 2012 R2:

Get-WmiObject -Namespace root\virtualization\v2 -class msvm_computersystem | select elementname, operationalstatus, processid, name| ft -auto

Get a list of all running VMs:

Get-VM | grep Running

Get-VM |  Where-Object {$_.State –eq 'Running'}

tasklist /v | grep vmwp
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s