HI,
Not to sure how to accomplish this and I've not done much with powershell for a little while now so was hoping to get some help.
Basically I need to do a quick capacity plan against a Hyper-V estate. The bit I am struggling with is getting the disk size for disks in the virtual machines and if they are dynamic or not. I have the script lines to do this, but the command doesn't return the virtual machine name.
So basically I want to combine the output of two scripts into one file.
This script line gets the Virtual Machines in the farm
Get-VM -VMMServer SP-SCVM02 | Select-Object ComputerName,Name,TotalSize,VMCPath
This line reads the Virtual Disk information
Get-SCVirtualHardDisk -VMMServer "SP-SCVM02" -vm $_.name | Select-Object VHDType,MaximumSize,Size
What I need to do is create a file (or output) that has the columns from both outputs together, so I can tie the Virtual Disks to the Computername.
Get-VM -VMMServer SP-SCVM02 | Select-Object ComputerName,Name,TotalSize,VMCPath | Foreach { Get-SCVirtualHardDisk -VMMServer "SP-SCVM02" -vm $_.name | Select-Object VHDType,MaximumSize,Size }
Any help appreciated.
thanks
Denis