From ff2dedaf11c6ca8126caaca1ead6521f5a292e7a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 19 Nov 2025 22:18:01 -0600 Subject: [PATCH] Update vCenter-SSL.ps1 --- inc/vCenter-SSL.ps1 | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/inc/vCenter-SSL.ps1 b/inc/vCenter-SSL.ps1 index a309baa1..cb6c52b7 100644 --- a/inc/vCenter-SSL.ps1 +++ b/inc/vCenter-SSL.ps1 @@ -65,7 +65,7 @@ try { Install-Module VCF.PowerCLI -Force -Scope AllUsers -AllowClobber } - Import-Module VCF.PowerCLI -ErrorAction Stop -Verbose:$false + Import-Module VCF.PowerCLI -ErrorAction Stop | Out-Null Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false ` -ParticipateInCEIP:$false -DisplayDeprecationWarnings:$false | Out-Null @@ -76,7 +76,7 @@ try { if (-not (Get-Module -ListAvailable -Name Posh-ACME)) { Install-Module Posh-ACME -Force -Scope AllUsers } - Import-Module Posh-ACME -ErrorAction Stop -Verbose:$false + Import-Module Posh-ACME -ErrorAction Stop | Out-Null Write-Log INFO "Posh-ACME loaded." } catch { Show-Failure $_ } @@ -180,28 +180,28 @@ if (-not $paCert) { exit 1 } -# ---------------------------- -# Certificate file resolution -# ---------------------------- -$certFolder = Split-Path $paCert.CertFile -Parent - -$certPath = Join-Path $certFolder "cert.cer" -$keyPath = Join-Path $certFolder "cert.key" -$chainPath = Join-Path $certFolder "chain.cer" - -Write-Log INFO "Using cert folder: $certFolder" -Write-Log INFO " CERT : $certPath" -Write-Log INFO " KEY : $keyPath" -Write-Log INFO " CHAIN: $chainPath" - -foreach ($f in @($certPath,$keyPath,$chainPath)) { - if (-not (Test-Path $f)) { - Write-Log ERROR "Missing cert file: $f" - exit 1 - } -} - if ($needNewCert) { + # # ---------------------------- + # # Certificate file resolution + # # ---------------------------- + # $certFolder = Split-Path $paCert.CertFile -Parent + # + # $certPath = Join-Path $certFolder "cert.cer" + # $keyPath = Join-Path $certFolder "cert.key" + # $chainPath = Join-Path $certFolder "chain.cer" + # + # Write-Log INFO "Using cert folder: $certFolder" + # Write-Log INFO " CERT : $certPath" + # Write-Log INFO " KEY : $keyPath" + # Write-Log INFO " CHAIN: $chainPath" + # + # foreach ($f in @($certPath,$keyPath,$chainPath)) { + # if (-not (Test-Path $f)) { + # Write-Log ERROR "Missing cert file: $f" + # exit 1 + # } + # } + # ---------------------------- # Add CA chain to trusted store (remove duplicates) # ----------------------------