API Reference
Command
Set-TestimoXService
Apply a TestimoX service configuration (validated first).
Remarks
If connected via Connect-TestimoXService, the cmdlet POSTs the JSON to the Management API, which validates the payload and persists it (hot-reload). If not connected, it validates locally and copies the file to the deployed service folder (admin required), optionally restarting the service.
Examples
Example 1: Update config and restart
PS>
Set-TestimoXService -Name TestimoX -ConfigPath C:\Configs\service.json -Restart
Example 2: Add and remove API keys (requires Connect-TestimoXService)
PS>
Connect-TestimoXService -Url 'https://server:7809/' -ApiKey (Get-Content C:\secret.txt -Raw)
Set-TestimoXService -AddApiKeyName 'alice' -AddApiKeyValue (Get-Content C:\alice.key -Raw)
Set-TestimoXService -RemoveApiKeyName 'alice'
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
- Add an API key with this friendly name (requires Management API).
- AddApiKeyValue string
- API key secret text to add (requires -AddApiKeyName).
- ConfigPath string
- Path to service.json to validate and apply.
- LicensePath string
- Optional path to a TestimoX.Service license container (.txlic) to deploy next to the service binary.
- Name string
- Windows service name.
- RemoveApiKeyName string
- Remove an API key by friendly name (requires Management API).
- Restart SwitchParameter
- Restart (or run once when connected to API) after applying the config.
Outputs
TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment