From b10e5606150bfc47ce3dca8d947c4ed124306cce Mon Sep 17 00:00:00 2001 From: Alan Comstock <31929022+Mr-Uptime@users.noreply.github.com> Date: Wed, 13 Sep 2017 12:37:15 -0500 Subject: [PATCH] Update SetMultiPathToRoundRobin --- Scripts/SetMultiPathToRoundRobin | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Scripts/SetMultiPathToRoundRobin b/Scripts/SetMultiPathToRoundRobin index 382cbd3..c1a6253 100644 --- a/Scripts/SetMultiPathToRoundRobin +++ b/Scripts/SetMultiPathToRoundRobin @@ -1,6 +1,17 @@ +<# +Script name: SetMultiPathToRoundRobin.ps1 +Created on: 09/13/2017 +Author: Alan Comstock, @Mr_Uptime +Description: Set the MultiPath policy for FC devices to RoundRobin +Dependencies: None known +PowerCLI Version: VMware PowerCLI 6.5 Release 1 build 4624819 +PowerShell Version: 5.1.14393.1532 +OS Version: Windows 10 +#> + #Check a host for any Fibre Channel devices that are not set to Round Robin. Modify to check clusters if needed. -Get-VMhost VMHOSTNAME | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType disk | Where { $_.MultipathPolicy -notlike "RoundRobin" } | Select CanonicalName,MultipathPolicy +Get-VMhost HOSTNAME | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType disk | Where { $_.MultipathPolicy -notlike "RoundRobin" } | Select CanonicalName,MultipathPolicy #Set the Multipathing Policy on a host to Round Robin for any Fibre Channel devices that are not Round Robin -$scsilun = Get-VMhost VMHOSTNAME | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType disk | Where { $_.MultipathPolicy -notlike "RoundRobin" } +$scsilun = Get-VMhost HOSTNAME | Get-VMHostHba -Type "FibreChannel" | Get-ScsiLun -LunType disk | Where { $_.MultipathPolicy -notlike "RoundRobin" } Set-ScsiLun -ScsiLun $scsilun -MultipathPolicy RoundRobin