Change Path Selection to Round Robin

#####################################################################################################################################
# Titre      : Change Path Selection to Round Robin
# Nom fichier: Change Path Selection to Round Robin.ps1  
#    
######################################################################################################################################
# Description: check all path are set to Round Robin. and change it if necessairy
# Les éléments de sortie:
######################################################################################################################################

##################
# Add VI-toolkit #
##################
& {
$ErrorActionPreference = "silentlycontinue"
$vmwareSnap = get-pssnapin -name "VMware.VimAutomation.Core"
if (! $?)
{
 Add-PSsnapin VMware.VimAutomation.Core
 Initialize-VIToolkitEnvironment.ps1
}
}

##################
# Connexion à VC #
##################
entrez le nom de vcenter à place des XXX# replace XXX by vcenter name#
$vcServer = "xxxxxxxxxx.xx.xxx"
connect-VIServer $vcserver

#######################
# Début du traitement #
#######################
$lesHosts = Get-VMHost -Name ""

foreach($unHost in $lesHosts)
{
# replace NETAPP by your vendor#
 $unHost | Get-ScsiLun -LunType "disk" | where {$_.MultipathPolicy -ne "RoundRobin" -and $_.vendor -like "NETAPP"} | Set-ScsiLun -MultipathPolicy "RoundRobin"
}

##############################
# Disconnect session from VC #
##############################
disconnect-viserver -confirm:$false
###############################
# Fin de l'exécution du script#
###############################

Commentaires

Messages les plus consultés de ce blogue

VMware Explore 2024 Party list events

VMware Explore 2025 registration is now live and there is some great improvements

Changement dans les licences VMware à compter du 10 avril 2025