mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
14 lines
429 B
PowerShell
14 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
|
|
)
|
|
);
|
|
}
|
|
}
|