02-27-2015 02:11 PM
Has anyone used Powershell to interact with REST API on PA500?
When I use the Invoke-RestMethod cmdlet to try and generate a key, I get back an empty response. If I run the keygen through a browser, it successfully returns a key. Running 6.1.1.
PS C:> Invoke-RestMethod -Uri http://<ip-of-PA500>/api/?type=keygen%26ampuser=<adminuser>%26amppassword=<adminpassword>
response
-------------
response
http://<ip-of-PA500>/api/?type-keygen&user=<adminuser>&password=<adminpassword>
<response status="success">
<result>
<key>
<.....generated key.....>
</key>
</result>
</response>