PowerShell Universal cmdlets return a 404 over HTTPS

PowerShell Universal cmdlets return a 404 over HTTPS

Version: 1.4
PowerShell Version: Windows PowerShell 5.1
Problem
When issue commands against the PowerShell Universal Management API (such as Get-UAJob, Get-UAScript, etc), the cmdlet will return a 404 error. This can happen when running scripts within PowerShell Universal (APIs, scripts, dashboards) or outside of PowerShell Universal. 
Root Cause
The cause of this issue is misconfigured TLS settings for the PowerShell process. You will not see this issue with PowerShell 6 or 7 but will present itself in Windows PowerShell. 
Workaround
The workaround for this issue is to set the TLS setting to 1.2 for the Windows PowerShell process. You can do so with the following snippet.
  1. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12