/build/static/layout/Breadcrumb_cap_w.png

Where to find information on exporting KACE Inventory information to other data applications?

Where can I find information on exporting asset information such as Inventory IDs to other databases?  


0 Comments   [ + ] Show comments

Answers (1)

Posted by: frank.clark@magaero.com 1 year ago
Senior White Belt
0

You can use reporting to generate and email reports as CSV file or such.

You can use the API to pull.

You would need to see how your external applications can work with the rest api stuff.

https://support.quest.com/technical-documents/kace-systems-management-appliance/12.1%20common%20documents/api-reference-guide#TOPIC-1751780

and https://support.quest.com/kb/4288264/verifying-api-connection-with-postman


I am using KaceSMA to make it easier.
https://www.powershellgallery.com/packages/KaceSMA/2.0.1

https://github.com/ArtisanByteCrafter/KaceSMA/wiki


..but after Kace 12.0 you will need to edit one of his files.
C:\Program Files\WindowsPowerShell\Modules\KaceSMA\2.0.1\public\Connect-Server.ps1

I remarked the x-dell-api-version line and added the kace one.

      #$script:Headers.Add('x-dell-api-version', '8')
      $script:Headers.Add('x-kace-api-version', '12')

I also had to change the CSRF return from:

      #$script:CSRFToken = $Request.Headers.'x-dell-csrf-token'
      #$script:Headers.Add("x-dell-csrf-token", "$script:CSRFToken")

to :

      If ($Request.Headers.'x-kace-authorization' -ne $null){
$script:CSRFToken = $Request.Headers.'x-kace-authorization'
$script:Headers.Add("x-kace-csrf-token", "$script:CSRFToken")
#'Kace Authorization found as: '+$script:CSRFToken
      }


In my testing environment, I also found that I needed this for a self-signed server...but maybe it wasn't this....as I later found that I needed to run the commands very near each other in time.

      # This next line was added for self-signed server
        [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }

I use these variables to keep things easier:
      $Cred = Get-Credential
      $KBOX = [KACE SERVER URL]
      $Org = ['Default' or ORG NAME]

As a last item of note, for me I need to connect and run the command within a short period of time, so I put the lines together.

      Connect-SmaServer -Server $KBOX -Org $Org -Credential $Cred -Verbose;Get-SMAMachineInventory -QueryParameters '?shaping=machine limited&paging=limit ALL' | Tee-Object -Variable Test

The resulting variable named test can be shown as a list or table as normal $Test | FT

I use the Custom Inventory Rules (extensively) to add/pull information such as the Intune Device ID. I can then pull a list of the device that has that ID/item.

      Connect-SmaServer -Server $KBOX -Org $Org -Credential $Cred -Verbose;Get-SMAMachineInventory -QueryParameters '?filtering=Machine_Custom_Inventory.Str_Field_Value co [Intune Device ID]' | Tee-Object -Variable Test

Use shaping to limit the return if desired:

      Connect-SmaServer -Server $KBOX -Org $Org -Credential $Cred -Verbose;Get-SMAMachineInventory -QueryParameters '?shaping=machine limited&filtering=Machine_Custom_Inventory.Str_Field_Value co [SOME IDENTIFIER IN CIR]' | Tee-Object -Variable Test

As per Nathaniel Webb ArtisanByteCrafter: "By default, the SMA API limits queries to 50 results. To override this, use the string ?paging=limit XX in your -QueryParameters, where XX is the limit you want. Use ALL for all results."


I will be making some actions and such to use these.

I haven't yet included using a SAML account or the MFA...just haven't gotten to it...but I will.


 
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