Skip to content
ArtisanByteCrafter edited this page Jul 2, 2019 · 4 revisions

Q: What Commands are available?

A: You can find all commands available in the KaceSMA module by running the following command:

PS $ Import-Module KaceSMA
PS $ Get-Command -Module KaceSMA

Q: I see the managed_install folder in the module, but no commands are available?

A: I have found and reported several bugs in the Managed Install API endpoint. Until these are resolved, they are not made available in the KaceSMA module.

Q: My queries are limited to 50 results?

A: 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. For more examples, see the Example query parameters

Q: I limited my results to X, but the 'Count' still has all my machines?

A: Be default, the count will return all possible results, even if they are not included in the actual payload. If you're paging results, and don't want this confusion, simply add the query parameter use_count=false and it will not return. Alternately, use a filter.

Q: I want to run my API script in an automated fashion. Can i store credentials to use rather than being prompted?

A: Yes. To store credentials to retrive in the script, i recommend one of two methods (Windows):

  • The Data Protection API method - This stores your credentials in an encrypted object, only decryptable by your current user account on your current machine.

    • Store your credentials in a credential object:
    Get-Credential | Export-Clixml -Path "C:\Example\Path\to\credentials.xml"
    • Retrieve them in the script. For the -Credential parameter of each function, use the following:
    -Credential (Import-Clixml -Path "C:\Example\Path\to\credentials.xml")
  • The CredentialManager Powershell Module can utilize the Windows Credential Store to securely store and retrieve credential objects. Refer to their documentation on setting this up. (It works fantastic.)

Q: Set-SmaMachineInventory triggers a client-side inventory?

A: This is by design of the appliance, and is not caused by the Powershell module itself. The SMA sees a change of machine inventory as a change of the inventory on the endpoint itself and attempts to reconcile itself. This could have undesired consequences if the machine in question is offline when it's inventory record is updated. For example, LDAP smart labels are dropped until the machine checks in again. Use this cmdlet accordingly.

You can’t perform that action at this time.