TestimoX

API Reference

Command

Connect-TestimoXService

Namespace TestimoX.PowerShell
Outputs
TestimoX.PowerShell.ServiceConnectionInfo

Connects the current PowerShell session to the TestimoX Management API.

Examples

Authored help example

Example 1: Connect to a loopback management endpoint and persist the session for seven days

PS>


Connect-TestimoXService -Url 'http://127.0.0.1:7809/' -ApiKey (Get-Content 'C:\ProgramData\TestimoX\Secrets\management-api.key' -Raw) -SaveForDays 7
        

Subsequent Get-/Set-/Invoke-TestimoXService calls in this and future sessions can reuse the saved connection details.

Example 2: Reconnect by reusing the previously saved session

PS>


Connect-TestimoXService -UseSaved
        

This is useful in scheduled admin shells where the API endpoint and key do not change often.

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

Connect-TestimoXService [-ApiKey <string>] [-SaveForDays <int>] [-Url <string>] [-UseSaved] [<CommonParameters>]
#

Parameters

ApiKey string optionalposition: namedpipeline: false
API key used to authenticate with the Management API. The cmdlet prompts securely when this parameter is omitted.
SaveForDays int optionalposition: namedpipeline: false
Persists the session for the specified number of days. A value of 0 keeps the connection in memory only.
Url string optionalposition: namedpipeline: false
Base URL of the Management API, for example http://127.0.0.1:7809/ or an HTTPS listener exposed by the service host.
UseSaved SwitchParameter optionalposition: namedpipeline: false
Reuse a previously saved session, including the cached base URL and API key, when one is available and not expired.

Outputs

TestimoX.PowerShell.ServiceConnectionInfo