mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
15 lines
429 B
PowerShell
15 lines
429 B
PowerShell
|
|
function Disable-IcingaUntrustedCertificateValidation()
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
[System.Net.ServicePointManager]::CertificatePolicy = $null;
|
||
|
|
|
||
|
|
Write-Host 'Successfully disabled untrusted certificate validation for this shell instance';
|
||
|
|
} catch {
|
||
|
|
Write-Host (
|
||
|
|
[string]::Format(
|
||
|
|
'Failed to disable untrusted certificate policy: {0}', $_.Exception.Message
|
||
|
|
)
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|