Hi,
How can I get the Vendor Name and LUN number for the below script, please help!!
function Get-FreeScsiLun {
param (
[parameter(ValueFromPipeline = $true,Position=1)]
[ValidateNotNullOrEmpty()]
[VMware.VimAutomation.Client20.VMHostImpl]
$VMHost
)
process{
$storMgr = Get-View $VMHost.ExtensionData.ConfigManager.DatastoreSystem
$storMgr.QueryAvailableDisksForVmfs($null) | %{
New-Object PSObject -Property @{
VMHost = $VMHost.Name
CanonicalName = $_.CanonicalName
Uuid = $_.Uuid
CapacityGB = [Math]::Round($_.Capacity.Block * $_.Capacity.BlockSize / 1GB,2)
}
}
}
}
$esx = Get-VMHost -Name "myesx"
Get-FreeScsiLun -VMHost $esx | Select VMHost, CanonicalName, CapacityGB, Uuid | ft -auto