Getting information from all HyperVisors

by Feb 25, 2014

Hello,

We currently have 6 HyperVisors running in our domain. Lets call them Server1 through Server6, with numerous virtual machines on them.

I want to get information from them through Powershell, without having to log in to them separately.

What I have now:

Get-VM -computername server1, server2, server3, server4, server5, server6 | Select vmid | Get-VHD | select Path, VHDType, ComputerName, Size, Filesize, SnapShot | export-csv "C:userswandapowershelllog.csv"

What I do:

It seems I cannot run this directly from my Windows 7 SP1 machine, I get a: "Get-VM : The term 'Get-VM' is not recognized…" message.

When I remotely log in to server 1 (enter-pssession -computername server1) it works, but I only get the results for server1 when running the script. 

I am using Powershell 4.0.