Thanks, I read this stackoverflow answer and added this line to the top of my script:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
And it now returns fine.
Thanks, I read this stackoverflow answer and added this line to the top of my script:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
And it now returns fine.