Skip to content

Commit e391884

Browse files
committed
Added possibility to skip certificate check in PowerShell 6
1 parent d34fa49 commit e391884

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/StorageGRID-Webscale.psm1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ function global:Connect-SGWServer {
123123
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
124124
}
125125
else {
126-
Write-Warning "PowerShell 6 does not yet support skipping of certificate checks"
126+
if (!"Invoke-RestMethod:SkipCertificateCheck") {
127+
$PSDefaultParameterValues.Add("Invoke-RestMethod:SkipCertificateCheck",$true)
128+
}
129+
else {
130+
$PSDefaultParameterValues.'Invoke-RestMethod:SkipCertificateCheck'=$true
131+
}
127132
}
128133
}
129134

0 commit comments

Comments
 (0)