VMware Cloud Community
xacolabril
Expert
Expert
Jump to solution

How can I get LUN's active path?

I want to know active path for all of my luns. How can I get this value?

Thank you tios!

Best regards

Xavier

VMware Certified Professional VCP3 and VCP4.

-


Si encuentras que esta o cualquier otra respuesta ha sido de utilidad, vótalas. Gracias.

If you find this or any other information helpful or correct, please consider awarding points. Thank you.

Xavier Colomé Abril. VMware Certified Professional VCP3, VCP4 and VCP5. [Si encuentras que esta o cualquier otra respuesta ha sido de utilidad, vótalas. Gracias.] [If you find this or any other information helpful or correct, please consider awarding points. Thank you.]
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You could do something like this

$report = @()
Get-VMHost  | %{
	$esx = $_
	$_ | Get-ScsiLun | %{
		$lun = $_
		$_ | Get-ScsiLunPath | %{
			$row = "" | Select HostName, LUNname, Path, Active
			$row.HostName = $esx.Name
			$row.LUNname = $lun.CanonicalName
			$row.Path = $_.Name
			$row.Active = $_.State
			$report += $row
		}
	}
}
$report

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

You could do something like this

$report = @()
Get-VMHost  | %{
	$esx = $_
	$_ | Get-ScsiLun | %{
		$lun = $_
		$_ | Get-ScsiLunPath | %{
			$row = "" | Select HostName, LUNname, Path, Active
			$row.HostName = $esx.Name
			$row.LUNname = $lun.CanonicalName
			$row.Path = $_.Name
			$row.Active = $_.State
			$report += $row
		}
	}
}
$report

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos