Skip to content

Commit 87373ce

Browse files
authored
Update bestpracticecheckerv5.ps1
Replaced "7" with {"7","8"} in the HostVersionMajor checks to include support for checking vSphere 8 hosts.
1 parent 0f934e3 commit 87373ce

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bestpracticecheckerv5.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Foreach ($Esx in $Hosts)
196196
# vSphere 6.x requires IOPS=1 & vSphere 7.0 uses the Latency policy
197197
# DiskMaxIO is 4MB for older versions of vSphere & the default of 32MB for more recent versions
198198
Switch ($HostVersionMajor) {
199-
"7" { $MaxIORecommended = "32767";$PspOptions="policy=latency";$SatpType="latency"}
199+
{"7","8"} { $MaxIORecommended = "32767";$PspOptions="policy=latency";$SatpType="latency"}
200200
"5" { $MaxIORecommended = "4096";$PspOptions="iops=1";$SatpType="iops"}
201201
default {
202202
Switch ($HostVersionMinor) {
@@ -413,7 +413,7 @@ Foreach ($Esx in $Hosts)
413413

414414
# If vSphere 7, default to Latency, otherwise use IOPS=1
415415
Switch ($HostVersionMajor) {
416-
"7" { $SatpOption = "policy";$SatpType="latency"}
416+
{"7","8"} { $SatpOption = "policy";$SatpType="latency"}
417417
default { $SatpOption = "iops";$SatpType="iops"}
418418
}
419419

@@ -447,7 +447,7 @@ Foreach ($Esx in $Hosts)
447447

448448
# SATP Rule Check
449449
Switch ($HostVersionMajor) {
450-
"7" {
450+
{"7","8"} {
451451
if ($rule.PSPOptions -ne "policy=latency") {
452452
$EsxError = $true
453453
Add-Content $Logfile " FAIL - This Pure Storage FlashArray rule is NOT configured with the correct Policy = Latency: $($rule.PSPOptions)"
@@ -492,7 +492,7 @@ Foreach ($Esx in $Hosts)
492492
Add-Content $Logfile " FAIL - No correct SATP rule for the Pure Storage FlashArray is found"
493493
Add-Content $LogFile " A new rule should be created that is set Round Robin" -NoNewline
494494
Switch ($HostVersionMajor) {
495-
"7" { Add-Content $LogFile " using the Latency policy"}
495+
{"7","8"} { Add-Content $LogFile " using the Latency policy"}
496496
default { Add-Content $LogFile " and an IO Opeations limit of $($iopsvalue)"}
497497
}
498498
}
@@ -533,7 +533,7 @@ Foreach ($Esx in $Hosts)
533533
$deviceconfig = $Esxcli.storage.nmp.psp.roundrobin.deviceconfig.get.invoke($deviceargs)
534534

535535
Switch ($HostVersionMajor) {
536-
"7" {
536+
{"7","8"} {
537537
if ($deviceconfig.LimitType -ne "Latency")
538538
{
539539
$deviops = $true

0 commit comments

Comments
 (0)