Update vCenter-SSL.ps1
This commit is contained in:
@@ -82,7 +82,8 @@ function Invoke-SafeRestMethod {
|
|||||||
try {
|
try {
|
||||||
$handler = [System.Net.Http.HttpClientHandler]::new()
|
$handler = [System.Net.Http.HttpClientHandler]::new()
|
||||||
$handler.AutomaticDecompression = [System.Net.DecompressionMethods]::None
|
$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 = [System.Net.Http.HttpClient]::new($handler)
|
||||||
$client.Timeout = [System.TimeSpan]::FromSeconds($TimeoutSec)
|
$client.Timeout = [System.TimeSpan]::FromSeconds($TimeoutSec)
|
||||||
|
|||||||
Reference in New Issue
Block a user