Update vCenter-SSL.ps1

This commit is contained in:
2025-11-15 18:56:01 -06:00
parent ca5f9a69ff
commit 30d7f6b45a

View File

@@ -82,7 +82,8 @@ function Invoke-SafeRestMethod {
try {
$handler = [System.Net.Http.HttpClientHandler]::new()
$handler.AutomaticDecompression = [System.Net.DecompressionMethods]::None
$handler.ServerCertificateCustomValidationCallback = { $true }
$handler.ServerCertificateCustomValidationCallback = { param($sender, $cert, $chain, $errors) return $true }
$client = [System.Net.Http.HttpClient]::new($handler)
$client.Timeout = [System.TimeSpan]::FromSeconds($TimeoutSec)