Combining PowerCLI & ESXCLI to change PSP on a Large Scale

Using PowerCLI you can use Set-ScsiLun -MultipathPolicy “RoundRobin” to set the PSP, but I found it quite slow using it on a large scale. It would update one datastore on one host every 5 seconds. If there were 10 ESXi hosts with 200 Datastores, that’s 2000 operations, at 5 seconds each, it adds up to 3 hours. The same can be done using ESXCLI extremely quickly, but it’s run on each host.

Updating powershell help

When installing Powershell v3, it doesn’t install any local help files for get-help. If you are upgrading from v2 to v3, the help isn’t updated either. If you are using a proxy, a simple update-help may not work for you. Do the following: $webclient = New-Object System.Net.WebClient$creds = Get-Credential$webclient.Proxy.Credentials = $credsupdate-help This will connect to the internet and download the updated help files.