Skip to content

Commit f104ad5

Browse files
committed
Fixed array connection
Fixed the correct way to connect to an array using the latest version of the Toolkit and SDK.
1 parent 6c36b76 commit f104ad5

3 files changed

+23
-49
lines changed

PureStorage-vSphere-2024-09-10T09.41.19.0894999-07.00-checkbestvvolreadiness.log

Lines changed: 0 additions & 23 deletions
This file was deleted.

PureStorage-vSphere-2024-09-10T09.44.00.4800352-07.00-checkbestvvolreadiness.log

Lines changed: 0 additions & 23 deletions
This file was deleted.

VvolsReadinessCheckerV2.ps1

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ If ($DefaultFlashArray) {
325325
try
326326
{
327327
$FaCredentials = Get-Credential -Message "Please enter the FlashArray Credentials for $($FaEndPoint)"
328-
$FlashArray = New-PfaConnection -EndPoint $FaEndpoint -Credentials $FaCredentials -ErrorAction Stop -IgnoreCertificateError -DefaultArray
328+
$FlashArray = Connect-Pfa2Array -EndPoint $FaEndPoint -Credential $FaCredentials -ErrorAction Stop -IgnoreCertificateError
329329
$ConnectFA = $True
330330
}
331331
catch
@@ -343,7 +343,6 @@ If ($DefaultFlashArray) {
343343

344344
}
345345

346-
347346
$errorHosts = @()
348347
write-host "Executing..."
349348

@@ -442,7 +441,7 @@ else
442441

443442

444443
# Check for NTP daemon running and enabled
445-
$ntpSettings = $esx | Get-VMHostService | Where-Object {$_.key -eq "ntpd"} | select vmhost, policy, running
444+
$ntpSettings = $esx | Get-VMHostService | Where-Object {$_.key -eq "ntpd"} | Select-Object vmhost, policy, running
446445

447446
if ($ntpSettings."policy" -contains "off")
448447
{
@@ -463,6 +462,27 @@ else
463462
}
464463
}
465464

465+
<#
466+
# Capture all of the storage providers of the current vCenter
467+
468+
$storageProviders = Get-StorageProvider
469+
470+
# Output the details of each storage provider
471+
foreach ($provider in $storageProviders) {
472+
[PSCustomObject]@{
473+
Name = $provider.Name
474+
Description = $provider.Description
475+
Type = $provider.Type
476+
Uri = $provider.Uri
477+
Status = $provider.Status
478+
ProviderCategory = $provider.ProviderCategory
479+
}
480+
481+
Add-Content $logfile ""
482+
Add-Content $logfile
483+
}
484+
#>
485+
466486
# Check FlashArray's NTP Settings
467487
$ArrayId = New-PfaRestOperation -ResourceType array -RestOperationType GET -Flasharray $DefaultFlashArray -SkipCertificateCheck
468488
add-content $logfile ""

0 commit comments

Comments
 (0)