You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently found that the line of code below causes some Microsoft Az module commands to throw a general exception with the message: "An error occurred while sending the request."
I received this when trying to call "Get-AzStorageTable" after using New-NCentralConnection. I was able to workaround the issue by manually setting the ServerCertificateValidationCallback to the default value of $null before using any commands in the Az.Storage module.
This was also preventing me from running any Invoke-WebRequest or Invoke-RestMethod commands later in my script.
Using the workaround after establishing the connection allows the rest of my script to work.
Additional calls to the PS-NCentral module also work.
I recently found that the line of code below causes some Microsoft Az module commands to throw a general exception with the message: "An error occurred while sending the request."
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
I received this when trying to call "Get-AzStorageTable" after using New-NCentralConnection. I was able to workaround the issue by manually setting the ServerCertificateValidationCallback to the default value of $null before using any commands in the Az.Storage module.
Workaround:
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
The text was updated successfully, but these errors were encountered: