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