API Reference
Initialize-TestimoXService
Installs, uninstalls, updates, restarts, or runs the TestimoX Windows service from one administrative cmdlet.
Examples
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>]#By InstallParameters
- Install SwitchParameter
- Installs the Windows service.
- ServicePath string
- Path to TestimoX.Service.exe used for install, uninstall, or one-time execution.
- Account string
- Logon account for the service. Supported values include LocalSystem, LocalService, NetworkService, or a domain account.
- ConfigPath string
- Path to the service.json file to validate and deploy during install or apply operations.
- Credential PSCredential
- Credential for the specified domain account. This parameter is ignored for built-in service accounts.
- Description string
- Windows service description written to the Service Control Manager.
- DisplayName string
- Windows service display name. When omitted, the cmdlet derives a sensible display name from -Name.
- Name string
- 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>]#By UninstallParameters
- ServicePath string
- Path to TestimoX.Service.exe used for install, uninstall, or one-time execution.
- Uninstall SwitchParameter
- Uninstalls the Windows service.
- Name string
- 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>]#By RunNowParameters
- RunNow SwitchParameter
- Runs the service workload once without installing a Windows service.
- Name string
- Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.
- RunNowConfigPath string
- Optional configuration path for one-time execution. When omitted, the cmdlet uses the deployed service.json.
- ServicePath string
- 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>]#By ApplyParameters
- Apply SwitchParameter
- Applies a new configuration to the deployed service folder after validating the JSON structure.
- ConfigPath string
- Path to the service.json file to validate and deploy during install or apply operations.
- Name string
- Windows service name to install, update, restart, or uninstall. Defaults to TestimoX.
- Restart SwitchParameter
- 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>]#Set 5Parameters
- Restart SwitchParameter
- Restarts the service after applying the configuration.
- Name string
- 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