20231213 PSEdition = Core in Update attachVPNGateway.ps1

Incorrectly tries to do ipsec in Windows PS7, which has PSEdition = Core. Adding `-or` logic.
This commit is contained in:
William Assaf MSFT
2023-12-13 16:49:20 -08:00
committed by GitHub
parent 68db9029ba
commit 30deab80c1
@@ -19,7 +19,7 @@ if ($clientCertificatePassword -eq '' -or ($null -eq $clientCertificatePassword)
function VerifyPSVersion {
Write-Host "Verifying PowerShell version."
if ($PSVersionTable.PSEdition -eq "Desktop") {
if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.PSEdition -eq "Core" ) {
if (($PSVersionTable.PSVersion.Major -ge 6) -or
(($PSVersionTable.PSVersion.Major -eq 5) -and ($PSVersionTable.PSVersion.Minor -ge 1))) {
Write-Host "PowerShell version verified." -ForegroundColor Green
@@ -219,7 +219,7 @@ function CreateCerificateOpenSsl() {
function CreateCertificate() {
Write-Host "Creating certificate."
if ($PSVersionTable.PSEdition -eq "Desktop") {
if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.PSEdition -eq "Core" ) {
return CreateCerificateWindows
}
else {