REST call returns certificate or TLS errors
Documentation: Microsoft Learn
Work the problem
The TCP port is open
Fictional case: Port 443 accepts a connection, but the HTTPS request reports a certificate-name mismatch.
Reasoning notebook
Record the evidence that supports your answer and the check you would run next. Your notes stay in this browser — nothing is uploaded.
Why it happens
An HTTPS connection must negotiate TLS and validate the server certificate before the HTTP operation can complete. Name mismatch, expiration, trust-chain problems, protocol negotiation and proxy interception are different failure paths. Windows PowerShell 5.1 behavior depends on its .NET and operating-system configuration; do not assume every 5.1 host always negotiates an obsolete protocol.
Check this first
What to look for
The TCP path works. The TLS identity check fails, so investigate the hostname, presented certificate and any proxy interception.
Working through it
Read the exact TLS or certificate error. Compare the requested hostname, presented certificate, expiry and trust chain, including any approved proxy. Use the method supported by the endpoint; a rejected HEAD request is not necessarily a TLS problem.
Correct the endpoint certificate, approved trust deployment or platform protocol configuration indicated by the evidence. Keep certificate validation enabled during the final test.
Avoiding it next time
Verify the repair: Repeat the request with normal certificate validation enabled and verify the intended endpoint identity.