To disable SSL validation please specify -IgnoreSSL to Connect-PrtgServer, rather than fiddling with the certificate validation yourself
Connect-PrtgServer $ServerName (New-Credential $User $Pass) -IgnoreSSL
If your PRTG server doesn't actually run HTTPS however, you need to manually specify "http://" in front of your address, otherwise PrtgAPI will assume HTTPS.
If you've done something to your PRTG server to disable the use of TLS versions prior to 1.2, you may need to instruct PowerShell to use 1.2 only
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
If you still get an error, you can do
$error[0].Exception.InnerException
to potentially get additional details about what the issue was.
Add comment