Hello All,
We are trying to access the unified manager API using the powershell, On the swagger page all is working as expected but when trying to call or open the uri links, we are receiving below errors.
> $url = "https://<IP-Address>/api/datacenter"
> $result = Invoke-RestMethod -Method 'GET' -Uri $url -header $header -Credential $cred -ContentType "application/JSON"
Invoke-RestMethod : Active IQ Unified Manager | ErrorError 401 - UnauthorizedPlease go back to the homepage and try again.
At line:1 char:11
+ $result = Invoke-RestMethod -Method 'GET' -Uri $url -header $header - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
>
Powershell Version:
--------------------------
Name : Windows PowerShell ISE Host
Version : 5.1.19041.2673
ActiveIQ Unified Manager:
-----------------------------------
Version: 9.9
Please let me know what could be the issue, credential are local database admin credentials.