AnsweredAssumed Answered

Anyone successful using the new API from PowerShell?

Question asked by john.lemay@tmnas.com on Sep 11, 2017
Latest reply on Sep 11, 2017 by john.lemay@tmnas.com

Is anyone using the new API from PowerShell scripts? I'm not getting any results with any of the /rest uris. I have a feeling this might be auth related but I cannot find any information on passing credentials. I'm trying to use invoke-restmethod passing credentials grabbed with get-credentials. I'm referencing the rest docs on the device (http://$device/vmturbo).

 

$device=1.1.1.1

$cred = get-credentials

$r = invoke-restmethod -Credentials $cred -uri "http://$device/vmturbo/rest/groups

 

PS C:\>$r

<!DOCTYPE html>

<html ng-app="vmturbo" ng-strict-di>

...

Outcomes