PowerShell Universal cmdlets return a 404 over HTTPS
PowerShell Version: Windows PowerShell 5.1
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.
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.
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.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12