Can you help me with my Powershell script? I am fairly new to Powershell but my boss wants me to get this done soon.
For each VM on our HyperVisor (Server 2012) we want the associated VHD files and for each VHD file:
- The location of the file
- The size of the file (max allowed)
- The actual size of the file (current allocated)
- The type of allocation: thick or thin
- The location of the snapshot file
- The size of the snapshot file
I have come up with this so far (well.. what I've found)(* is our HV name):
Get-VM –ComputerName ***** |
Get-VMHardDiskDrive |
Select-Object -Property VMName, ComputerName, Path, Filesize, Size, Disktype, Snapshot |
Sort-Object -Property VMName
Somehow this doesnt give any output for Filesize, disktype, size and Snapshot..