VMware Cloud Community
td_sk
Contributor
Contributor

powershell script to get the current path selection policy of ESXi host.

Hi

  Thanks in advance.

     Can any one have the script to check the currently used  path selection policy of ESXi 4.1 host.

     I am looking for a script which will give me the current luns ad it current path selection policy.

Eg. naa.600… /vmfs/devices/disks/naa.600… disk 768000 Fixed

Thanks

Siv

0 Kudos
1 Reply
mkool89
Contributor
Contributor

Hi Siv,

I do this the following way:

$vcenter=Read-Host "Please enter VCenter FQDN"

$csvlocation=Read-Host "Please enter a location for the CSV logfile"

$servername=Read-Host "Please enter the FQDN of the server"

Connect-ViServer $vcenter

get-vmhost $servername | get-scsilun | Export-Csv -NoTypeInformation -UseCulture $csvlocation\$vcenter.csv

Disconnect-VIServer $vcenter -Confirm:$False

Save the script as a PS1 file and run from powercli.

Hope this does the trick for you.

Regards,

Marco