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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting Virtual SAN Switches and Port Details of Hyper-V Cluster Nodes
Posted in Virtual Machine Manager, Windows Powershell, Windows Server | No Comment | 1,612 views | 02/10/2013 14:56

Life saver if you have many nodes in a Hyper-V cluster :)

1
2
3
4
5
6
7
8
9
10
11
12
$SANSwitches = Get-Cluster | Get-ClusterNode | % { Get-VMSAN -ComputerName $_.Name }
Foreach ($SANSwitch in $SANSwitches)
{
	$Name = $SANSwitch.Name
	$HBADetails = $SANSwitch | Select -Expand HBAs
	$PortAddress = $HBADetails.PortAddress
	$ComputerName = $HBADetails.PSComputerName
	Write-Host "Server: $ComputerName"
	Write-Host "Switch Name: $Name"
	Write-Host "Port Address: $PortAddress"
	Write-Host " "
}

Just buy me a cup of coffee if you like it :)



Leave a Reply