Search code examples
powershellrestautomationstoragesan

Invoke-WebRequest : Cannot validate argument on parameter 'Uri' Brocade switch FOS REST API


I am entering the username and password of the brocade switch. The same credentials are used for ssh.

Basically I am trying to run a brocade command. I am calling the api using Powershell Invoke-WebRequest. I am doing this for the first time using powershell.

I am getting below error:


Solution

  • I figured out the problem in this code. The issue is with https. https is not enabled. To enable https on brocade switch I followed the steps given on this document: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://docs.broadcom.com/doc/FOS-82x-AG

    Pre-Reqs: To use the recommended HTTPS protocol, a valid security certificate must be installed on the switch and the HTTPS protocol must be enabled on the switch before beginning REST operations. Refer to the Brocade Fabric OS Administration Guide for instructions on both these actions.