AnsweredAssumed Answered

Anyone successful using the new API from PowerShell?

Question asked by on Sep 11, 2017
Latest reply on Sep 11, 2017 by

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).



$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>