popunder new

https://www.blogger.com/blog/posts/1739890295310631346

Monday, January 28, 2013

Get all vm’s on a hyper-v server and output to text file

This two line PowerShell script will get all vm’s on a hyper-v server and output to text file. Change path and name of vmrunning.txt to suit your needs.

Works on Server 2012 with powershell 3

 Get-VM | Where-Object {$_.State -eq ‘Running’} | out-file -filepath C:VMrunning.txt  
C:VMrunning.txt

No comments:

Post a Comment