search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Virtual Machine Manager, Windows Powershell, Windows Server | No Comment | 2,721 views | 23/10/2013 09:02

You can use this script to get details information of your Hyper-V Cluster:

1
2
(Get-Cluster | Get-ClusterNode | Select Name,@{label="CPU";expression={@(Get-WmiObject -ComputerName $_.Name -Class Win32_Processor)[0].Name}},@{label="Free Memory (GB)";expression={([math]::round(((Get-WmiObject -ComputerName $_.Name -Class Win32_OperatingSystem).FreePhysicalMemory / 1MB), 0))}},@{label="Free Memory (%)";expression={([math]::round(([math]::round(((Get-WmiObject -ComputerName $_.Name -Class Win32_OperatingSystem).FreePhysicalMemory / 1MB), 0))/([math]::round(((Get-WmiObject -ComputerName $_.Name -Class Win32_OperatingSystem).TotalVisibleMemorySize / 1MB), 0))*100))}},@{label="Total Memory (GB)";expression={([math]::round(((Get-WmiObject -ComputerName $_.Name -Class Win32_OperatingSystem).TotalVisibleMemorySize / 1MB), 0))}} | Sort Name) >> C:\info.txt
(Get-ClusterSharedVolume | Select -ExpandProperty SharedVolumeInfo | Select @{label="Name";expression={(($_.FriendlyVolumeName).Split("\"))[-1]}},@{label="Free Space (GB)";expression={([math]::round(((($_ | Select -Expand Partition).FreeSpace)/ 1GB), 0))}},@{label="Percent Free (%)";expression={([math]::round((($_ | Select -Expand Partition).PercentFree), 0))}},@{label="Total Space (GB)";expression={([math]::round(((($_ | Select -Expand Partition).Size)/ 1GB), 0))}} | Sort Name) >> C:\info.txt

That will output results into C:\info.txt.