Tuesday, March 24, 2015

Script to set VMware Multipath policy by Powercli on a whole Datacenter/Cluster by specific LUN name:

Get-Datacenter "MyDatacenter" | Get-VMhost | Get-ScsiLun -CanonicalName "naa.6005076802*" -LunType disk | Set-ScsiLun -MultipathPolicy "RoundRobin"

Script to set default PSP for SATP, or anyway to loop a specific esxcli command throught a bunch of hosts by powercli:

$hosts = Get-Datacenter "MyDatacenter" |Get-VMHost
foreach($vihost in $hosts){
  $esxcli = get-vmhost $vihost | Get-EsxCli

(from http://www.virten.net/2014/02/howto-use-esxcli-in-powercli)

No comments:

Post a Comment