Unable to verify API Using Windows Powershell
Applies to
- ONTAP 9.7P10
- REST API
- Windows PowerShell
Issue
Rest API is generating unauthorized message when run from Windows PowerShell.
Example Error Message:
PS C:\Windows\system32> Invoke-WebRequest -Method Get -uri https://clus01/api/svm -Credential admin invoke-WebRequest :
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.at line:1 char:1
Invoke-WebRequest -Method Get -uri https://clus01/api/svm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand