[updated: 1/14/19] Changed project from GitLab to GitHub and added some newly updated cmdlets.









I've written a small pet project called KaceSMA, a light weight SMA Powershell module that you can install on Windows,Mac,or Linux (mac/linux via PSCore). What it does is it essentially wraps the API in a Powershell compatibility layer and returns objects in a easy to digest format for all your automation needs. How do you use it you ask?





[edit] Updated way to install:





From a PS shell:





Install-Module KaceSMA





Here is the project: https://github.com/ArtisanByteCrafter/KaceSMA





Here's some basic examples of what you can do, along with the code to do it:









Invoke a script against a list of machines

Add a task to an existing script

Return Machines with Encryption status of "Fully Encrypted"



Return SMA inventory machines with title 'Arduino' installed



Return all inventory members of smart label named "D - SmartLabel - Test"



Find the registry uninstall strings of all Software Inventory VMWare products

The only limit is really your API parameter creativity.





I expose the following Functions for use (today). More are being added often.





(Get-Command -Module KaceSMA).name

Get-SmaAgentlessInventory Get-SmaArchiveAsset Get-SmaAsset Get-SmaAssetType Get-SmaBarcodeAsset Get-SmaCurrentUserAccount Get-SmaMachineInventory Get-SmaMachineProcess Get-SmaMachineService Get-SmaManagedInstall Get-SmaManagedInstallMachineCompatibility Get-SmaOperatingSystemInventory Get-SmaReportingDefinition Get-SmaScript Get-SmaScriptDependency Get-SmaScriptRunStatus Get-SmaScriptTask Get-SmaServiceDeskQueue Get-SmaServiceDeskQueueField Get-SmaServiceDeskTicket Get-SmaServiceDeskTicketTemplate Get-SmaSoftwareInventory Get-SmaStartupProgramInventory Get-SmaUserPermissions Invoke-SmaScript New-SmaAsset New-SmaScript New-SmaScriptTask New-SmaServiceDeskTicket Remove-SmaServiceDeskTicket Set-SmaAssetAsArchived Set-SmaMachineInventory Set-SmaServiceDeskTicket

This isn't an exhaustive list of the API, there are a few I'm not exposing yet due to bugs on the SMA API end (dutifully ticketed and tracked already via support request with Quest), namely the Managed Install endpoint. If anyone has a request for a GET method that isn't covered, let me know- or submit a Pull Request!

You can install via "Install-Module KaceSMA", and update with "Update-Module KaceSMA". You can also clone the repository if you'd rather. Here's an output if a simple asset retrieval:



Thanks, and happy coding! Nathaniel Webb (isudothings)

Like Powershell? Like KACE? If you're like me, you've noticed the KACE API sitting out there in right field, waiting on someone to hit a long fly. It's fantastic, but the barrier-to-entry might be a little daunting if you're unfamiliar with APIs.