API Reference
Get-TestimoXService
Get TestimoX service status or read/generate the service configuration.
Remarks
If connected via Connect-TestimoXService, this cmdlet calls the Management API (status/config/preview). Otherwise it reads the deployed configuration locally and computes a preview from the schedule. Default output is the currently deployed typed configuration. Use -Status to return only service status, -WhatIfNext to preview upcoming run times, or provide -Path with schedule options to generate a new service.json scaffold.
Examples
Example 1: Get status
PS>
Get-TestimoXService -Name TestimoX -Status
Example 2: Read deployed service configuration
PS>
Get-TestimoXService -Name TestimoX
Example 3: Generate a service.json scaffold
PS>
Get-TestimoXService -Path C:\Configs\service.json -Mode Daily -DailyTimes 01:00 -EnableAdSnapshot
Example 4: List API key names and LastSetUtc
PS>
Get-TestimoXService -ApiKeys
Example 5: Tail service logs (last 200 lines by default)
PS>
Get-TestimoXService -Logs -Lines 500 -Date 20250930
Example 6: Check service health
PS>
Get-TestimoXService -Health
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
Get-TestimoXService [-Config] [-Name <string>] [<CommonParameters>]#By ConfigParameters
- Config SwitchParameter
- When set in the Read set, return the deployed typed configuration instead of status.
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-Name <string>] [-Status] [<CommonParameters>]#By StatusParameters
- Name string
- Windows service name.
- Status SwitchParameter
- Return only service status (Name, Status, CanStop, paths), not configuration.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-ApiKeys] [-Name <string>] [<CommonParameters>]#By ApiKeysParameters
- ApiKeys SwitchParameter
- List configured API keys (name and LastSetUtc) via the Management API.
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-Contains <string>] [-Date <string>] [-Level <string>] [-Lines <int>] [-Logs] [-Name <string>] [<CommonParameters>]#By Contains + DateParameters
- Contains string
- Optional substring filter: include only lines that contain this text.
- Date string
- Optional date for -Logs (yyyyMMdd). Defaults to today.
- Level string
- Optional log level filter (e.g., Info, Warn, Error).
- Lines int
- Number of lines to read for -Logs/-History (default 200; max 5000).
- Logs SwitchParameter
- Tail service logs from the Management API or local files.
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-History] [-Lines <int>] [-Name <string>] [<CommonParameters>]#By HistoryParameters
- History SwitchParameter
- Show recent run history (timestamps and outcomes).
- Lines int
- Number of lines to read for -Logs/-History (default 200; max 5000).
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-Baselines] [-Name <string>] [<CommonParameters>]#By BaselinesParameters
- Baselines SwitchParameter
- List baseline files produced by previous runs.
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-Health] [-Name <string>] [<CommonParameters>]#By HealthParameters
- Health SwitchParameter
- Return a health snapshot from the Management API (if connected).
- Name string
- Windows service name.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-WhatIfNext <int>] [<CommonParameters>]#By WhatIfNextParameters
- WhatIfNext int
- Preview next N scheduled run times (default 5) when using the Preview set.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-Metrics] [<CommonParameters>]#By MetricsParameters
- Metrics SwitchParameter
- Return a metrics snapshot (counters/timers) from the Management API.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo
Get-TestimoXService [-DailyTimes <string[]>] [-EnableAdSnapshot] [-IntervalSeconds <int>] [-JitterSeconds <int>] [-Mode <Disabled|Interval|Daily|Weekly>] [-OutputDirectory <string>] [-Path <string>] [-Profile <AdSecurityAssessment>] [-RunAtStartup] [-Shape <All|SummaryOnly|PassFailOnly|ResultsOnly>] [-WeeklyDays <string[]>] [-WeeklyTime <string>] [<CommonParameters>]#By DailyTimes + EnableAdSnapshotParameters
- DailyTimes string[]
- Times for Daily mode in HH:mm, multiple allowed (e.g., 01:00,13:00).
- EnableAdSnapshot SwitchParameter
- Enable the Active Directory snapshot stage.
- IntervalSeconds int
- Interval seconds for Interval mode (ignored by other modes).
- JitterSeconds int
- Randomize next-run times by up to this many seconds.
- Mode ScheduleMode
- Schedule mode when generating a new service.json: Disabled, Interval, Daily, or Weekly. Possible values: Disabled, Interval, Daily, Weekly
- Possible values:
Disabled,Interval,Daily,Weekly - OutputDirectory string
- Directory for generated outputs (reports/baselines) when the service runs.
- Path string
- Optional output path; when set, writes the generated service.json to this file. Otherwise outputs the typed object.
- Profile RuleSelectionProfile
- Optional curated rule-selection profile to place in the generated TestRun section. Possible values: None, AdSecurityAssessment
- Possible values:
AdSecurityAssessment - RunAtStartup SwitchParameter
- Run immediately at service start (in addition to the schedule).
- Shape ExportSelectionMode
- Report shape to produce (SummaryOnly or IncludeDetails). Possible values: All, SummaryOnly, PassFailOnly, ResultsOnly
- Possible values:
All,SummaryOnly,PassFailOnly,ResultsOnly - WeeklyDays string[]
- Days of week for Weekly mode (e.g., Monday,Wednesday).
- WeeklyTime string
- Time for Weekly mode in HH:mm.
Outputs
System.Collections.Generic.List`1[[System.DateTimeOffset, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceApiKeyInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.List`1[[TestimoX.Services.ServiceBaselineInfo, TestimoX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]], TestimoX.Configuration.GeneratedFileResult, TestimoX.Configuration.Service.ServiceConfig, TestimoX.Services.ServiceHealthStatus, TestimoX.Services.ServiceMetricsSnapshot, TestimoX.Services.ServiceRuntimeStatus, TestimoX.Services.ServiceStatusInfo