@@ -78,6 +78,7 @@ function Initialize-PfaVcfWorkloadDomain {
7878 [string ]$VcfNetworkPool
7979
8080 )
81+ Import-Module PureStoragePowerShellSDK
8182 if ($psversiontable.PSEdition -ne " Core" )
8283 {
8384 throw " The cmdlet Initialize-PfaVcfWorkloadDomain is only supported with PowerShell Core (7.x or later)."
@@ -263,7 +264,7 @@ function Initialize-PfaVcfWorkloadDomain {
263264 Write-Progress - parentid 1 - Id 2 - Activity " Registering VASA Provider with VCF SDDC Manager." - Status " Adding VASA Provider" - PercentComplete 50
264265 if ([string ]::IsNullOrWhiteSpace($foundProvider ))
265266 {
266- New-PfaVcfVasaProvider - arrayAddress $FlashArrayFqdn - ArrayCredential $FlashArrayCredential - Protocol $foundProtocol
267+ New-PfaVcfVasaProvider - arrayAddress $FlashArrayFqdn - ArrayCredential $FlashArrayCredential - Protocol $foundProtocol | Out-Null
267268 }
268269 else {
269270 if ($foundProvider.storageContainers.protocolType -ne $foundProtocol )
@@ -451,7 +452,13 @@ function New-PfaVcfVasaProvider {
451452 $fa = New-PfaArray - EndPoint $ArrayAddress - Credentials $ArrayCredential - IgnoreCertificateError
452453 $mgmtIP = New-PfaRestOperation - resourceType network - restOperationType GET - flasharray $fa - SkipCertificateCheck | Where-Object {$_.name -like " CT0.eth0" }
453454 $arrayname = New-PfaRestOperation - resourceType array - restOperationType GET - flasharray $fa - SkipCertificateCheck
454- $foundProtocol = checkFaProtocol - flasharray $fa - protocol $Protocol - ErrorAction stop
455+ if ([string ]::IsNullOrWhiteSpace($Protocol ))
456+ {
457+ $foundProtocol = checkFaProtocol - flasharray $fa - ErrorAction stop
458+ }
459+ else {
460+ $foundProtocol = checkFaProtocol - flasharray $fa - protocol $Protocol - ErrorAction stop
461+ }
455462 $FaName = (" $ ( $arrayname.array_name ) -CT0" )
456463 $VasaUrl = (" https://$ ( $mgmtIP.address ) :8084/version.xml" )
457464 $stdPassword = ConvertFrom-SecureString $ArrayCredential.password - AsPlainText
@@ -488,7 +495,7 @@ function checkFaProtocol{
488495 [Parameter (Position = 0 , mandatory = $true )]
489496 [PurePowerShell.PureArray ]$Flasharray ,
490497
491- [Parameter (Position = 1 , mandatory = $true )]
498+ [Parameter (Position = 1 )]
492499 [string ]$Protocol
493500 )
494501 $arrayname = New-PfaRestOperation - resourceType array - restOperationType GET - flasharray $Flasharray - SkipCertificateCheck
0 commit comments