icinga-powershell-framework/lib/webserver/Disable-IcingaUntrustedCertificateValidation.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

14 lines
458 B
PowerShell

function Disable-IcingaUntrustedCertificateValidation()
{
try {
[System.Net.ServicePointManager]::CertificatePolicy = $null;
Write-IcingaConsoleNotice 'Successfully disabled untrusted certificate validation for this shell instance';
} catch {
Write-IcingaConsoleError (
[string]::Format(
'Failed to disable untrusted certificate policy: {0}', $_.Exception.Message
)
);
}
}