When I try to use Invoke-WebRequest on https, I'm getting some weird error:
Invoke-WebRequest : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Here is my code:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls
$url = "https://X.X.X.X:4343/officescan/console/html/cgi/cgiChkMasterPwd.exe"
$r = Invoke-WebRequest $url -SessionVariable office
Any advice for me?