I'm confused about something simple . I need to list out the MultiPathPolicy of all the datastores on all my hosts (this woulod be 5 ESX 4.1 hosts, and 1 ESXi 5 host, using PowerCLI v5). I was using this:
Get-VMHost | %{$_.Name; $_ | Get-ScsiLun | Select CanonicalName, MultiPathPolicy}
But that shows me the datastore name in the format "naa.600a0b800011115500005ab68a87764d", which is less than human-readable. 🙂 I want it to show as "DataStore_01", etc - the name I have given the datastore. What is that property? I tried to format-list it, but didn't see it ...
So what do I need to select to show me that?
Thanks
I'm afraid the datastore name is not in there. But it is not too difficult to make the link.
You can use the New-VIproperty called lunDatastoreName for example.
Then you can do
Get-VMHost | %{$_.Name; $_ | Get-ScsiLun | Select lunDatastoreName, MultiPathPolicy}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
BTW, the reason its not a property of a SCSILun is because a SCSI Lun might not have a datastore (it could be an RDM) or it might be a member extent (extended datastore).
True, but when it is, the property will show the datastorename.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This should give you all the info you need... and as it has already been stated, not all luns are associated with a datastore