Skip to main content
NetApp Knowledge Base

Unable to verify API Using Windows Powershell

Views:
139
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

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

 

Scan to view the article on your device
CUSTOMER EXCLUSIVE CONTENT

Registered NetApp customers get unlimited access to our dynamic Knowledge Base.

New authoritative content is published and updated each day by our team of experts.

Current Customer or Partner?

Sign In for unlimited access

New to NetApp?

Learn more about our award-winning Support