Hi
Is it possible to collect the target wwn info for example 10:11:01:60:c7:20:0b:11 of the datastores attached to the host?
Try something like this
foreach($esx in Get-VMHost){
foreach($lun in (Get-ScsiLun -VmHost $esx -LunType disk)){
Get-ScsiLunPath -ScsiLun $lun |
Select @{N="RuntimeName";E={$lun.RuntimeName}},
@{N="LUN";E={$lun.lunID}},
@{N="CanonicalName";E={$lun.CanonicalName}},
@{N="Target WWN";E={$_.SanId}}
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This highlighted number is what I want
Try something like this
foreach($esx in Get-VMHost){
foreach($lun in (Get-ScsiLun -VmHost $esx -LunType disk)){
Get-ScsiLunPath -ScsiLun $lun |
Select @{N="RuntimeName";E={$lun.RuntimeName}},
@{N="LUN";E={$lun.lunID}},
@{N="CanonicalName";E={$lun.CanonicalName}},
@{N="Target WWN";E={$_.SanId}}
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference