[WRN] Failed to verify module and server version. Call failed. The SSL connection could not be established, see inner exception Get https://servername:443/api/v1/version
Product: PowerShell Universal
This has been an issue for a while. See here
All of my scripts whether manually run or scheduled get this error.
[WRN] Failed to verify module and server version. Call failed with status code 400 (Bad Request): GET
Anyone know why or how to fix?
I have the same warning pop up on all of my scripts.
If you are hosting in IIS, you need to set the Api\Url setting to the external URL. What’s happening is that PSU fails to determine the external URL due to the IIS proxy and attempts to call the internal URL which fails.
I am not hosting in IIS and having the issue. I’ll set the API settings in Kestrel to my https URL and see if the error still occurs. Right now it is empty.
That seems to have fixed the warning. I no longer get it when scripts run.
Great! Moving forward, I’m going to remove the need to do this. There’s no need to have to call the REST API from the jobs like this. I’ll just pass those objects over the gRPC channel to the jobs.