-
Notifications
You must be signed in to change notification settings - Fork 12
FAQ
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
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.
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
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] (https://docs.microsoft.com/en-us/dotnet/standard/security/how-to-use-data-protection) 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.)