/build/static/layout/Breadcrumb_cap_w.png

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? 



1 Comment   [ + ] Show comment
  • 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)

Posted by: SMal.tmcc 5 years ago
Red Belt
1

ArtisanByteCrafter is usually on slack more then here, join slack thru this invite and post there also



Comments:
  • see you did get on slack. cool - SMal.tmcc 5 years ago
    • thanks man - i actually got into the slack channel. i just targeted a message at him. - cdmead 5 years ago
      • just went to slack and saw you posted. - SMal.tmcc 5 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ