TestimoX

API Reference

Command

Invoke-TestimoX

Namespace TestimoX.PowerShell
Outputs
TestimoX.Definitions.RuleComplete TestimoX.PowerShell.StoreReportResult

Runs the TestimoX engine once from the current PowerShell session.

Examples

Authored help example

Example 1: Run a focused set of typed rules and keep the interactive Spectre view

PS>


$cs = [TestimoX.Definitions.CSharpRule]; $ps = [TestimoX.RulesPowerShell.PowerShellRule]; Invoke-TestimoX -IncludeCSharpRules @($cs::ForestSystemStateBackups) -IncludePowerShellRules @($ps::ForestRecycleBinAndLifetimes) -Verbosity Detailed -View Standard
        

This is a good operator workflow when validating a small subset before widening scope.

Example 2: Run a curated profile and persist reusable results in the durable store

PS>


Invoke-TestimoX -Profile AdSecurityAssessment -StoreDir 'C:\Ops\TestimoX\Store' -StorePolicy ReadWrite -StoreTtl 7.00:00:00 -HtmlReportPath 'C:\Ops\TestimoX\Reports\AdSecurity.html'
        

The durable store enables later comparisons and lets future runs reuse matching snapshots.

Example 3: Resume a partially completed run after an interruption

PS>


Invoke-TestimoX -StoreDir 'C:\Ops\TestimoX\Store' -RunId '2026-04-04T0130' -ResumeFromRun '2026-04-04T0130' -IncludeCSharpRules ([TestimoX.Definitions.CSharpRule]::ForestPkiConfiguration)
        

Only rules already recorded in that run are skipped, which makes recovery from interrupted maintenance windows much simpler.

Example 4: Publish HTML from the store without executing any rules

PS>


Invoke-TestimoX -PublishFromStore -StoreDir 'C:\Ops\TestimoX\Store' -HtmlReportPath 'C:\Ops\TestimoX\Reports\TestimoX-FromStore.html'
        

This is useful when you want to regenerate a website artifact after tweaking report templates.

Example 5: Run from a checked-in configuration file and a reviewed rule-override set

PS>


Invoke-TestimoX -ConfigPath 'C:\Ops\TestimoX\Configs\run.json' -RuleConfigPath 'C:\Ops\TestimoX\Configs\rules-overrides.json'
        

This keeps rule selection and per-rule tuning under source control instead of baking them into an interactive shell.

Example 6: Sample only a few DCs per domain during large enterprise runs

PS>


Invoke-TestimoX -DomainControllerTargetingMode SamplePerDomain -DomainControllerTargetsPerDomain 3
        

This keeps DomainController-scoped rules representative without forcing every DC in a large domain to run every time.

Example 7: Use the interactive wizard to pick exact DC hosts for execution

PS>


Invoke-TestimoX -Interactive
        

The interactive configuration step now offers Sample, All, and Explicit DC targeting, including a picker for reviewed DC host lists. For non-interactive exact host selection, use C# or JSON config with ExplicitDomainControllerTargets.

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

Invoke-TestimoX [-Baseline] [-ConfigPath <string>] [-DomainControllerTargetingMode <SamplePerDomain|All|Explicit>] [-DomainControllerTargetsPerDomain <int>] [-ExcludeCategories <Configuration>] [-ExcludeCSharpRules <CSharpRule[]>] [-ExcludeHeavy] [-ExcludeRules <string[]>] [-ExcludeTags <string[]>] [-Filter <string>] [-ForestName <string>] [-HtmlReportPath <string>] [-IncludeCategories <Configuration>] [-IncludeCSharpRules <CSharpRule[]>] [-IncludePowerShellRules <PowerShellRule[]>] [-IncludeRules <string[]>] [-IncludeSuperseded] [-IncludeTags <string[]>] [-Interactive] [-MachineName <string>] [-MaxCost <Trivial|Light|Moderate|Heavy|Extreme>] [-PowerShellCacheDirectory <string>] [-PowerShellCacheMode <Persistent|Temporary|Disabled>] [-PowerShellCatalogMode <Legacy|Auto|CompiledOnly>] [-PowerShellRulesDirectory <string>] [-Preflight <Enforce|Soft|Off>] [-Profile <AdSecurityAssessment>] [-PublishFromStore] [-ReportLanguages <English|Polish|German|Spanish>] [-ResumeFromRun <string>] [-RuleConfigPath <string>] [-RunId <string>] [-StoreAcceptStale] [-StoreComputersTtl <TimeSpan>] [-StoreDir <string>] [-StoreMatch <MatchPolicy>] [-StorePolicy <StoragePolicy>] [-StoreRaw <RawPolicy>] [-StoreTtl <TimeSpan>] [-StoreUsersTtl <TimeSpan>] [-StrictParity] [-Verbosity <Quiet|Normal|Detailed|Debug>] [-View <Auto|Standard|Ansi>] [<CommonParameters>]
#

Parameters

Baseline SwitchParameter optionalposition: namedpipeline: false
Prefer a safe baseline selection (skips DomainController-scoped rules).
ConfigPath string optionalposition: namedpipeline: false
Run from a JSON configuration file (service.json or run.json) and exit. When provided, other selection parameters are ignored.
DomainControllerTargetingMode DomainControllerTargetingMode optionalposition: namedpipeline: falsevalues: 3
Controls whether DomainController-scoped rules sample a subset of DCs per domain or run against every discovered DC. Use Explicit through the interactive wizard or JSON/C# configuration when you need reviewed named DC targets. Possible values: SamplePerDomain, All, Explicit
Possible values: SamplePerDomain, All, Explicit
DomainControllerTargetsPerDomain int optionalposition: namedpipeline: false
Maximum number of DCs per domain targeted by DomainController-scoped rules when sampling is enabled. Ignored when targeting mode is All or Explicit.
ExcludeCategories Category[] optionalposition: namedpipeline: falsevalues: 19
Categories to exclude during rule selection. Possible values: Configuration, Health, Security, Cleanup, Performance, Maintenance, Vulnerability, Compliance, Monitoring, Backup, Network, Storage, Identity, Authentication, Authorization, Audit, Availability, Replication, DNS
Possible values: Configuration, Health, Security, Cleanup, Performance, Maintenance, Vulnerability, Compliance, Monitoring, Backup, Network, Storage, Identity, Authentication, Authorization, Audit, Availability, Replication, DNS
ExcludeCSharpRules CSharpRule[] optionalposition: namedpipeline: false
Typed C# rules to exclude.
ExcludeHeavy SwitchParameter optionalposition: namedpipeline: false
Exclude Heavy/Extreme rules regardless of MaxCost.
ExcludeRules string[] optionalposition: namedpipeline: false
Rule names to exclude. Values may be supplied individually or as comma-separated lists.
ExcludeTags string[] optionalposition: namedpipeline: false
Tags to exclude (match any).
Filter string optionalposition: namedpipeline: false
Case-insensitive substring filter applied to rule names during selection.
ForestName string optionalposition: namedpipeline: false
Forest name to target for rules that support explicit forest scoping.
HtmlReportPath string optionalposition: namedpipeline: false
Optional path for the HTML report. When omitted, TestimoX generates a report file name in the default reports folder.
IncludeCategories Category[] optionalposition: namedpipeline: falsevalues: 19
Categories to include during rule selection. Possible values: Configuration, Health, Security, Cleanup, Performance, Maintenance, Vulnerability, Compliance, Monitoring, Backup, Network, Storage, Identity, Authentication, Authorization, Audit, Availability, Replication, DNS
Possible values: Configuration, Health, Security, Cleanup, Performance, Maintenance, Vulnerability, Compliance, Monitoring, Backup, Network, Storage, Identity, Authentication, Authorization, Audit, Availability, Replication, DNS
IncludeCSharpRules CSharpRule[] optionalposition: namedpipeline: false
Typed C# rules to include.
IncludePowerShellRules PowerShellRule[] optionalposition: namedpipeline: false
Typed embedded PowerShell rules to include. This can be combined with -IncludeRules; duplicates are ignored.
IncludeRules string[] optionalposition: namedpipeline: false
Rule names to include. Values may be supplied individually or as comma-separated lists.
IncludeSuperseded SwitchParameter optionalposition: namedpipeline: false
Include rules that are marked as superseded (run legacy/alternate implementations).
IncludeTags string[] optionalposition: namedpipeline: false
Tags to include (match any).
Interactive SwitchParameter optionalposition: namedpipeline: false
Runs the interactive selection and execution wizard instead of relying entirely on command-line parameters.
MachineName string optionalposition: namedpipeline: falsealiases: ComputerName, ServerName
Reserved machine selector retained for compatibility with older automation.
MaxCost RuleCost optionalposition: namedpipeline: falsevalues: 5
Maximum rule cost to include. When omitted, includes all costs. Possible values: Trivial, Light, Moderate, Heavy, Extreme
Possible values: Trivial, Light, Moderate, Heavy, Extreme
PowerShellCacheDirectory string optionalposition: namedpipeline: false
Overrides the root directory used for extracted PowerShell scripts.
PowerShellCacheMode PowerShellCacheMode optionalposition: namedpipeline: falsevalues: 3
Controls how legacy PowerShell scripts are cached on disk when used. Possible values: Persistent, Temporary, Disabled
Possible values: Persistent, Temporary, Disabled
PowerShellCatalogMode PowerShellCatalogMode optionalposition: namedpipeline: falsevalues: 3
Controls how compiled PowerShell catalogs are used (Legacy, Auto, or CompiledOnly). Possible values: Legacy, Auto, CompiledOnly
Possible values: Legacy, Auto, CompiledOnly
PowerShellRulesDirectory string optionalposition: namedpipeline: false
Path to a directory containing user PowerShell rules (.ps1). Overrides TESTIMOX_PS_RULES_DIR.
Preflight PreflightMode optionalposition: namedpipeline: falsevalues: 3
LDAP preflight behavior: Enforce, Soft, or Off. Possible values: Enforce, Soft, Off
Possible values: Enforce, Soft, Off
Profile RuleSelectionProfile optionalposition: namedpipeline: falsevalues: 5
Optional curated rule-selection profile to apply before explicit filters. Possible values: None, AdSecurityAssessment, DnsSecurityAudit, NistDnsAudit, GeneralDnsConfigurationAudit, AdDnsCleanupAudit
Possible values: AdSecurityAssessment, DnsSecurityAudit, NistDnsAudit, GeneralDnsConfigurationAudit, AdDnsCleanupAudit
PublishFromStore SwitchParameter optionalposition: namedpipeline: false
Generate HTML from an existing store without executing rules. Requires -StoreDir.
ReportLanguages ReportLanguage[] optionalposition: namedpipeline: falsevalues: 4
Report output languages to generate. When omitted, TestimoX generates English output only. Possible values: English, Polish, German, Spanish
Possible values: English, Polish, German, Spanish
ResumeFromRun string optionalposition: namedpipeline: false
Resume from a previously started run identified by this ID. Rules already recorded in that run are skipped.
RuleConfigPath string optionalposition: namedpipeline: false
Optional path to a rules configuration file (overrides RuleConfigPath in the JSON config).
RunId string optionalposition: namedpipeline: false
Optional explicit run identifier. When set, results are grouped under this ID and can be resumed later.
StoreAcceptStale SwitchParameter optionalposition: namedpipeline: false
Allows reuse of entries that are older than the configured TTL.
StoreComputersTtl TimeSpan optionalposition: namedpipeline: false
Overrides the TTL for Computers snapshots. When omitted, TestimoX uses -StoreTtl.
StoreDir string optionalposition: namedpipeline: false
Enables the durable store and points TestimoX at the directory that should hold reusable results.
StoreMatch MatchPolicy optionalposition: namedpipeline: false
Match policy for reuse, typically Config or Strict.
StorePolicy StoragePolicy optionalposition: namedpipeline: false
Durable store policy: Off, Read, Write, or ReadWrite.
StoreRaw RawPolicy optionalposition: namedpipeline: false
Raw payload policy for persisted data: Smart, All, or None.
StoreTtl TimeSpan optionalposition: namedpipeline: false
Default reuse TTL for cached results, for example 7.00:00:00 for seven days.
StoreUsersTtl TimeSpan optionalposition: namedpipeline: false
Overrides the TTL for Users snapshots. When omitted, TestimoX uses -StoreTtl.
StrictParity SwitchParameter optionalposition: namedpipeline: false
When set, selects all rules after filtering, skipping interactive selection.
Verbosity VerbosityLevel optionalposition: namedpipeline: falsevalues: 4
Verbosity level for engine output: Quiet, Normal, Detailed, or Debug. Possible values: Quiet, Normal, Detailed, Debug
Possible values: Quiet, Normal, Detailed, Debug
View ConsoleView optionalposition: namedpipeline: falsevalues: 3
Console rendering view: Auto, Standard, or Ansi. Possible values: Auto, Standard, Ansi
Possible values: Auto, Standard, Ansi

Outputs

TestimoX.Definitions.RuleComplete, TestimoX.PowerShell.StoreReportResult