Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 656 Bytes
# Variables
$vc = "vc2.uk.mdb-lab.com"
$credential = Get-Credential
$psp = "RoundRobin"
# Connect to the vCenter
Connect-VIServer $vc -Credential $credential
# Define the cluster
$cluster = "London_Lab"
# Retrieve disks and their associated PSP
Get-Cluster $cluster | Get-VMHost | Get-ScsiLun -LunType "disk" | where {$_.MultipathPolicy -ne $psp} | Format-Table CanonicalName,CapacityGB,Multipathpolicy -AutoSize
# Set the PSP to Round Robin
Get-Cluster $cluster | Get-VMHost | Get-ScsiLun -LunType "disk" | where {$_.MultipathPolicy -ne $psp} | Set-ScsiLun -MultipathPolicy $psp
# Disconnect from the vCenter
Disconnect-VIServer $vc
You can’t perform that action at this time.