API Calls - KaceSMA Powershell Module issues
Hi All,
I'm trying to do some API calls and integration so that we can snag inventory info for our devices and pipe it into SalesForce. I found the KaceSMA module that ArtisanByteCrafter wrote. I'm having some issues though.
To be fair i'm new to the API calling business so i'm likely missing something obvious.
after importing the module, when i try and run a simple Get-SMAMachineInventory i'm queried for server and credentials, and i receive the following error:
Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.
At C:\Program Files\WindowsPowerShell\Modules\kacesma\1.0.8\private\New-ApiGETRequest.ps1:80 char:5
+ Invoke-RestMethod @IRMSplat
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
It doesn't seem to matter what account i use, they're all throwing that error. what did i do wrong?
-
i played around with ARC in chrome and noticed that what i thought would be x-dell-csrf-token appears now to be kace-csrf-token... - cdmead 5 years ago
Answers (1)
ArtisanByteCrafter is usually on slack more then here, join slack thru this invite and post there also