TestimoX

API Reference

Command

Set-TestimoXService

Namespace TestimoX.PowerShell
Outputs
TestimoX.Services.ServiceActionResult TestimoX.Services.ServiceConfigDeployment

Validates and applies TestimoX service configuration or Management API key changes.

Examples

Authored help example

Example 1: Validate and deploy a reviewed service.json, then restart the service

PS>


Set-TestimoXService -Name 'TestimoX' -ConfigPath 'C:\Ops\TestimoX\Configs\service.json' -LicensePath 'C:\Ops\TestimoX\Licenses\TestimoX.Service.txlic' -Restart
        

This local-admin flow is the safest way to roll out both configuration and license updates together.

Example 2: Rotate Management API keys over the remote API

PS>


Connect-TestimoXService -Url 'https://testimox-gw.contoso.com:7809/' -ApiKey (Get-Content 'C:\ProgramData\TestimoX\Secrets\bootstrap.key' -Raw); Set-TestimoXService -AddApiKeyName 'automation-runner' -AddApiKeyValue (Get-Content 'C:\ProgramData\TestimoX\Secrets\automation-runner.key' -Raw); Set-TestimoXService -RemoveApiKeyName 'bootstrap'
        

This lets you move consumers to a new API key without redeploying the Windows service.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-TestimoXService [-AddApiKeyName <string>] [-AddApiKeyValue <string>] [-ConfigPath <string>] [-LicensePath <string>] [-Name <string>] [-RemoveApiKeyName <string>] [-Restart] [<CommonParameters>]
#

Parameters

AddApiKeyName string optionalposition: namedpipeline: false
Adds an API key under the specified friendly name. This action requires a Management API connection.
AddApiKeyValue string optionalposition: namedpipeline: false
Secret text for the API key being added. This parameter must be supplied together with -AddApiKeyName.
ConfigPath string optionalposition: namedpipeline: false
Path to the service.json file to validate and apply.
LicensePath string optionalposition: namedpipeline: false
Optional path to a TestimoX.Service license container (.txlic) to deploy next to the service binary.
Name string optionalposition: namedpipeline: false
Windows service name to update when the cmdlet is operating against the local machine.
RemoveApiKeyName string optionalposition: namedpipeline: false
Removes an API key by friendly name. This action requires a Management API connection.
Restart SwitchParameter optionalposition: namedpipeline: false
Restarts the local service, or triggers a one-time run when connected to the Management API, after a successful update.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment