@@ -27,7 +27,6 @@ This script will:
2727--Check for vCenter 7.0U3+ and ESXi 7.0U3+ (7.0 Update 3 is highly recommended)
2828--Check that FlashArray is accessible on TCP port 8084
2929--Check that a NTP server is set, valid, and daemon running on ESXi hosts and FlashArray
30- --Check for replication, remote side needs to meet above criteria too!
3130
3231All information logged to a file.
3332
@@ -263,7 +262,6 @@ Write-Host ""
263262Write-Host " Script result log can be found at $Logfile " - ForegroundColor Green
264263Write-Host " "
265264Add-Content $Logfile " Connected to vCenter: $ ( $Global :DefaultVIServer ) "
266- Add-Content $Logfile ' ----------------------------------------------------------------------------------------------------'
267265
268266# Choose to run the script against all hosts connected to a vCenter Server, or a single cluster
269267Do { $vSphereClusterChoice = Read-Host " Would you prefer to limit this to hosts in a specific cluster? (y/n)" }
@@ -307,7 +305,7 @@ if ($vSphereClusterChoice -match "[yY]") {
307305 Write-Host $vSphereCluster - ForegroundColor Green
308306 Write-Host " "
309307
310- # Assign all of the ESX hosts in $Cluster to the $ESXHosts variable, and sort the list alphabetically
308+ # Assign all of the ESX hosts in $vSphereCluster to the $ESXHosts variable, and sort the list alphabetically
311309 $ESXHosts = $vSphereCluster | Get-VMHost | Sort-Object Name
312310
313311} else {
@@ -335,23 +333,27 @@ If ($DefaultFlashArray.ArrayName) {
335333 write-host " Failed to connect to FlashArray" - BackgroundColor Red
336334 write-host $Error
337335 write-host " Terminating Script" - BackgroundColor Red
338- add-content $logfile " Failed to connect to FlashArray"
336+ add-content $logfile " ********** Failed to connect to FlashArray ********** "
339337 add-content $logfile $Error
340- add-content $logfile " Terminating Script"
338+ add-content $logfile " ********** Terminating Script ********** "
341339 $ConnectFA = $False
342340
343341 return
344342 }
345343
346344}
347345
348- $errorHosts = @ ()
346+ # $errorHosts = @()
349347write-host " Executing..."
350348
351349# Check vCenter version
352- add-content $logfile " Working on the following vCenter: $ ( $global :DefaultVIServers.name ) , version $ ( $Global :DefaultVIServers.Version ) "
353- add-content $logfile " -----------------------------------------------------------------------------------------------"
354- add-content $logfile " Checking vCenter Version"
350+ add-content $logfile " "
351+ add-content $logfile " ***********************************************************************************************"
352+ add-content $logfile " "
353+ add-content $logfile " Working on the following vCenter: $ ( $global :DefaultVIServers.Name ) , version $ ( $Global :DefaultVIServers.Version ) "
354+ add-content $logfile " "
355+ add-content $logfile " ***********************************************************************************************"
356+ add-content $logfile " Checking vCenter Version"
355357add-content $logfile " -------------------------------------------------------"
356358if ($global :DefaultVIServers.version -le [Version ]" 6.5" )
357359{
@@ -368,19 +370,19 @@ $vCenterTime = Get-VamiTime
368370
369371If ($vCenterTime.Mode -Like " NTP" ) {
370372 add-content $logfile " -----------------------------------------------------------------------------------------------"
371- add-content $logfile " vCSA NTP "
373+ add-content $logfile " vCSA NTP "
372374 add-content $logfile " -------------------------------------------------------"
373375 If ($vCenterTime.NTPStatus -eq " SERVER_REACHABLE" ) {
374376 add-content $logfile " NTP server set to $ ( $vCenterTime.NTPServers ) and is REACHABLE from vCenter"
375377 } else {
376378 add-content $logfile " -------------------------------------------------------"
377- add-content $logfile " [****NEEDS ATTENTION****] vCSA's NTP settings aren't checkable."
379+ add-content $logfile " [****NEEDS ATTENTION****] NTP settings aren't checkable from the vCenter Appliance ."
378380 add-content $logfile " Check VMware KB for manual process: https://knowledge.broadcom.com/external/article?articleNumber=313945"
379381 }
380382
381383} else {
382384 add-content $logfile " *-------------------------------------------------------"
383- add-content $logfile " [****NEEDS ATTENTION****] vCSA's NTP settings aren't checkable."
385+ add-content $logfile " [****NEEDS ATTENTION****] NTP settings aren't checkable from the vCenter Appliance ."
384386 add-content $logfile " Check VMware KB for manual process: https://knowledge.broadcom.com/external/article?articleNumber=313945."
385387}
386388
@@ -393,11 +395,11 @@ foreach ($esx in $ESXHosts)
393395{
394396 add-content $logfile " "
395397 add-content $logfile " ***********************************************************************************************"
396- add-content $logfile " **********************************NEXT ESXi HOST*********************************************** "
397- add-content $logfile " ----------------------------------------------------------------------------------------------- "
398- add-content $logfile " Working on the following ESXi host: $ ( $esx .Name ) , version $ ( $esx .Version ) "
399- add-content $logfile " ----------------------------------------------------------------------------------------------- "
400- add-content $logfile " Checking ESXi Version"
398+ add-content $logfile " "
399+ add-content $logfile " Working on the following ESXi host: $ ( $esx .Name ) , version $ ( $esx .Version ) "
400+ add-content $logfile " "
401+ add-content $logfile " *********************************************************************************************** "
402+ add-content $logfile " Checking ESXi Version"
401403 add-content $logfile " -------------------------------------------------------"
402404 # Check for ESXi version
403405 if ($esx.version -le [Version ]" 7.0" )
@@ -410,7 +412,7 @@ foreach ($esx in $ESXHosts)
410412 }
411413 add-content $logfile " "
412414 add-content $logfile " -------------------------------------------------------"
413- add-content $logfile " Checking NTP settings"
415+ add-content $logfile " Checking NTP settings"
414416 add-content $logfile " -------------------------------------------------------"
415417
416418 # Check for NTP server configuration
@@ -419,11 +421,11 @@ foreach ($esx in $ESXHosts)
419421$ntpServer = Get-VMHostNtpServer - VMHost $esx
420422if ($ntpServer -eq $null )
421423{
422- Add-Content $logfile " [****NEEDS ATTENTION****] NTP server for this ESXi host is null . Configure an NTP server before proceeding with VVols."
424+ Add-Content $logfile " [****NEEDS ATTENTION****] NTP server for this ESXi host is empty . Configure an NTP server before proceeding with VVols."
423425}
424426else
425427{
426- Add-Content $logfile " NTP server set to $ ( $ntpServer ) "
428+ Add-Content $logfile " NTP server set to $ ( $ntpServer ) "
427429 If ($PSEdition -eq " Core" ) {
428430 $testNetConnection = Test-Connection - TargetName $ntpserver
429431 } else {
@@ -433,11 +435,11 @@ else
433435
434436 if (! $testNetConnection )
435437 {
436- Add-Content $logfile " [****NEEDS ATTENTION****] Could not communicate with NTP server from this console. Check that it is valid and accessible."
438+ Add-Content $logfile " [****NEEDS ATTENTION****] Could not communicate with the NTP server from this console. Check that it is valid and accessible."
437439 }
438440 else
439441 {
440- Add-Content $logfile " NTP server is valid and accessible."
442+ Add-Content $logfile " NTP server is valid and accessible."
441443 }
442444}
443445
@@ -447,16 +449,16 @@ else
447449
448450 if ($ntpSettings ." policy" -contains " off" )
449451 {
450- Add-Content $logfile " [****NEEDS ATTENTION****] NTP daemon not enabled. Enable service in the ESXi host configuration."
452+ Add-Content $logfile " [****NEEDS ATTENTION****] NTP daemon is not enabled. Enable the service in the ESXi host configuration."
451453 }
452454 else
453455 {
454- Add-Content $logfile " NTP daemon is enabled."
456+ Add-Content $logfile " NTP daemon is enabled."
455457 }
456458
457459 if ($ntpSettings ." running" -contains " true" )
458460 {
459- Add-Content $logfile " NTP daemon is running."
461+ Add-Content $logfile " NTP daemon is running."
460462 }
461463 else
462464 {
@@ -489,13 +491,13 @@ foreach ($provider in $storageProviders) {
489491$FlashArray = get-pfa2array - array $DefaultFlashArray
490492add-content $logfile " "
491493add-content $logfile " ***********************************************************************************************"
492- add-content $logfile " ***************************** FLASHARRAY ********************************************** "
493- add-content $logfile " ----------------------------------------------------------------------------------------------- "
494- add-content $logfile " Working on the following FlashArray: $ ( $Flasharray .Name ) , Purity version $ ( $Flasharray .Version ) "
495- add-content $logfile " ----------------------------------------------------------------------------------------------- "
494+ add-content $logfile " "
495+ add-content $logfile " Working on the following FlashArray: $ ( $Flasharray .Name ) , Purity version $ ( $Flasharray .Version ) "
496+ add-content $logfile " "
497+ add-content $logfile " *********************************************************************************************** "
496498add-content $logfile " "
497499add-content $logfile " -------------------------------------------------------"
498- add-content $logfile " Checking NTP Setting"
500+ add-content $logfile " Checking NTP Setting"
499501add-content $logfile " -------------------------------------------------------"
500502$FlashArrayNTP = get-pfa2ArrayNtpTest - Array $DefaultFlashArray
501503if (! $flashArrayNTP.Enabled )
509511
510512 if (! $flashArrayNTP.Success )
511513 {
512- Add-Content $logfile " [****NEEDS ATTENTION****] Could not communicate with NTP server from this FlashArray. Check that it is valid and accessible."
514+ Add-Content $logfile " [****NEEDS ATTENTION****] Could not communicate with an NTP server from this FlashArray. Check that it is valid and accessible."
513515
514516 }
515517 else
520522# Check Purity version
521523add-content $logfile " "
522524add-content $logfile " -------------------------------------------------------"
523- add-content $logfile " Checking Purity Version"
525+ add-content $logfile " Checking Purity Version"
524526add-content $logfile " -------------------------------------------------------"
525527
526528if ($Flasharray.Version -ge [Version ]" 6.5" )
535537# Check TCP port 8084 reachability
536538add-content $logfile " "
537539add-content $logfile " -------------------------------------------------------"
538- add-content $logfile " Checking FlashArray Reachability on TCP port 8084"
540+ add-content $logfile " Checking FlashArray Reachability on TCP port 8084"
539541add-content $logfile " -------------------------------------------------------"
540542
541543$Interfaces = Get-Pfa2NetworkInterface - array $DefaultFlashArray | Where-Object {$_.services -Like " management" } | Where-Object {$_.name -Like " ct*" } | Where-Object {$_.enabled -eq " True" }
@@ -578,12 +580,14 @@ for ($x=0; $x -lt $PureHostGroups.count; $x++)
578580
579581if ($PureHostGroups.count -gt 0 -or $PureHosts -gt 0 )
580582{
581- Add-Content $logfile " FlashArray has $ ( $PureHostGroups.count ) Pure Host Groups set."
582- Add-Content $logfile " FlashArray has $ ( $PureHosts ) Pure Host Objects set."
583+ Add-Content $logfile " FlashArray has $ ( $PureHosts ) Pure Host Objects set."
584+ Add-Content $logfile " FlashArray has $ ( $PureHostGroups.count ) Pure Host Groups set."
585+ add-content $logfile " ***********************************************************************************************"
586+ Add-Content $logfile " "
583587}
584588else
585589{
586- Add-Content $logfile " [****NEEDS ATTENTION****] FlashArray does not have any hosts or host groups configured."
590+ Add-Content $logfile " [****NEEDS ATTENTION****] FlashArray does not have any Pure Host Objects or Pure Host Groups configured."
587591}
588592<#
589593# Check for replication
0 commit comments