TestimoX

API Reference

Command

Initialize-TestimoXService

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

Installs, uninstalls, updates, restarts, or runs the TestimoX Windows service from one administrative cmdlet.

Examples

Authored help example

Example 1: Install the service under LocalSystem using a published service binary

PS>


Initialize-TestimoXService -Install -ServicePath 'C:\Program Files\TestimoX\TestimoX.Service.exe'
        

This is the fastest way to deploy the service on a dedicated monitoring node.

Example 2: Install with an approved service account and a reviewed configuration file

PS>


Initialize-TestimoXService -Install -ServicePath 'C:\Program Files\TestimoX\TestimoX.Service.exe' -ConfigPath 'C:\Ops\TestimoX\Configs\service.json' -Account 'CONTOSO\svc-testimox' -Credential (Get-Credential)
        

Use this pattern when the service must run under a managed domain identity for outbound access or auditing.

Example 3: Deploy a new service.json and restart the service

PS>


Initialize-TestimoXService -Apply -Name 'TestimoX' -ConfigPath 'C:\Ops\TestimoX\Configs\service.json' -Restart
        

Example 4: Run the workload once without installing the service

PS>


Initialize-TestimoXService -RunNow -ServicePath 'C:\Program Files\TestimoX\TestimoX.Service.exe' -RunNowConfigPath 'C:\Ops\TestimoX\Configs\service.json'
        

This is useful for validating a new configuration on a staging host before creating the Windows service.

Example 5: Uninstall the deployed service

PS>


Initialize-TestimoXService -Uninstall -ServicePath 'C:\Program Files\TestimoX\TestimoX.Service.exe'
        

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

Initialize-TestimoXService -Install -ServicePath <string> [-Account <string>] -ConfigPath <string> [-Credential <PSCredential>] [-Description <string>] [-DisplayName <string>] [-Name <string>] [<CommonParameters>]
#
Parameter set: By Install

Parameters

Install SwitchParameter requiredposition: namedpipeline: false
Installs the Windows service.
ServicePath string requiredposition: namedpipeline: falsealiases: UninstallServicePath
Path to TestimoX.Service.exe used for install, uninstall, or one-time execution.
Account string optionalposition: namedpipeline: false
Logon account for the service. Supported values include LocalSystem, LocalService, NetworkService, or a domain account.
ConfigPath string requiredposition: namedpipeline: falsealiases: ApplyConfigPath
Path to the service.json file to validate and deploy during install or apply operations.
Credential PSCredential optionalposition: namedpipeline: false
Credential for the specified domain account. This parameter is ignored for built-in service accounts.
Description string optionalposition: namedpipeline: false
Windows service description written to the Service Control Manager.
DisplayName string optionalposition: namedpipeline: false
Windows service display name. When omitted, the cmdlet derives a sensible display name from -Name.
Name string optionalposition: namedpipeline: false
Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment, TestimoX.Services.ServiceInstallResult, TestimoX.Services.ServiceUninstallResult

Initialize-TestimoXService -ServicePath <string> -Uninstall [-Name <string>] [<CommonParameters>]
#
Parameter set: By Uninstall

Parameters

ServicePath string requiredposition: namedpipeline: falsealiases: UninstallServicePath
Path to TestimoX.Service.exe used for install, uninstall, or one-time execution.
Uninstall SwitchParameter requiredposition: namedpipeline: false
Uninstalls the Windows service.
Name string optionalposition: namedpipeline: false
Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment, TestimoX.Services.ServiceInstallResult, TestimoX.Services.ServiceUninstallResult

Initialize-TestimoXService -RunNow [-Name <string>] [-RunNowConfigPath <string>] -ServicePath <string> [<CommonParameters>]
#
Parameter set: By RunNow

Parameters

RunNow SwitchParameter requiredposition: namedpipeline: false
Runs the service workload once without installing a Windows service.
Name string optionalposition: namedpipeline: false
Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.
RunNowConfigPath string optionalposition: namedpipeline: false
Optional configuration path for one-time execution. When omitted, the cmdlet uses the deployed service.json.
ServicePath string requiredposition: namedpipeline: falsealiases: UninstallServicePath
Path to TestimoX.Service.exe used for install, uninstall, or one-time execution.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment, TestimoX.Services.ServiceInstallResult, TestimoX.Services.ServiceUninstallResult

Initialize-TestimoXService -Apply -ConfigPath <string> [-Name <string>] -Restart [<CommonParameters>]
#
Parameter set: By Apply

Parameters

Apply SwitchParameter requiredposition: namedpipeline: false
Applies a new configuration to the deployed service folder after validating the JSON structure.
ConfigPath string requiredposition: namedpipeline: falsealiases: ApplyConfigPath
Path to the service.json file to validate and deploy during install or apply operations.
Name string optionalposition: namedpipeline: false
Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.
Restart SwitchParameter requiredposition: namedpipeline: falsealiases: DoRestart
Restarts the service after applying the configuration.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment, TestimoX.Services.ServiceInstallResult, TestimoX.Services.ServiceUninstallResult

Initialize-TestimoXService -Restart [-Name <string>] [<CommonParameters>]
#
Parameter set: Set 5

Parameters

Restart SwitchParameter requiredposition: namedpipeline: falsealiases: DoRestart
Restarts the service after applying the configuration.
Name string optionalposition: namedpipeline: false
Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.

Outputs

TestimoX.Services.ServiceActionResult, TestimoX.Services.ServiceConfigDeployment, TestimoX.Services.ServiceInstallResult, TestimoX.Services.ServiceUninstallResult