TestimoX

API Reference

Command

Invoke-TestimoX

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

Invoke the TestimoX engine once from the current session.

Examples

Authored help example

Example 1: Run specific typed rules


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

Example 2: Combine string and typed rules


$cs = [TestimoX.Definitions.CSharpRule]
$ps = [TestimoX.RulesPowerShell.PowerShellRule]
Invoke-TestimoX -IncludeRules 'ForestRecycleBinAndLifetimes' -IncludeCSharpRules $cs::ForestSystemStateBackups -IncludePowerShellRules $ps::ForestRecycleBinAndLifetimes -Verbosity Detailed -View Standard
        

Example 3: Resume a partially completed run


Invoke-TestimoX -StoreDir 'C:\Data\TestimoX' -RunId '2025-10-24T1300' -ResumeFromRun '2025-10-24T1300' -IncludeCSharpRules ([TestimoX.Definitions.CSharpRule]::ForestPkiConfiguration)
        

Example 4: Publish HTML from the store (no execution)


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

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>] [-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] [-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.
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
C# rules to exclude (optional enum for IntelliSense convenience)
ExcludeHeavy SwitchParameter optionalposition: namedpipeline: false
Exclude Heavy/Extreme rules regardless of MaxCost.
ExcludeRules string[] optionalposition: namedpipeline: false
PowerShell rules to exclude
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
HtmlReportPath string optionalposition: namedpipeline: false
Optional path/filename for the HTML report. If omitted, a name is autogenerated inside a local "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
C# rules to include (optional enum for IntelliSense convenience)
IncludePowerShellRules PowerShellRule[] optionalposition: namedpipeline: false
Typed PowerShell rules to include (enum for IntelliSense). Can be combined with -IncludeRules; duplicates are ignored.
IncludeRules string[] optionalposition: namedpipeline: false
PowerShell rules to include
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
Run wizard-like interactive selection, similar to CLI.
MachineName string optionalposition: namedpipeline: falsealiases: ComputerName, ServerName
Optional computer name used by the cmdlet.
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, Off Possible values: Enforce, Soft, Off
Possible values: Enforce, Soft, Off
Profile RuleSelectionProfile optionalposition: namedpipeline: falsevalues: 1
Optional curated rule-selection profile to apply before explicit filters. Possible values: None, AdSecurityAssessment
Possible values: AdSecurityAssessment
PublishFromStore SwitchParameter optionalposition: namedpipeline: false
Generate HTML from an existing store without executing rules. Requires -StoreDir.
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
Allow reuse of stale entries older than TTL.
StoreComputersTtl TimeSpan optionalposition: namedpipeline: false
Override TTL for Computers snapshots (e.g., 12:00:00 for 12 hours). Defaults to -StoreTtl.
StoreDir string optionalposition: namedpipeline: false
Enable durable store and set directory.
StoreMatch MatchPolicy optionalposition: namedpipeline: false
Match policy for reuse: Config or Strict.
StorePolicy StoragePolicy optionalposition: namedpipeline: false
Store policy: Off, Read, Write, ReadWrite.
StoreRaw RawPolicy optionalposition: namedpipeline: false
Raw payload policy: Smart, All, None.
StoreTtl TimeSpan optionalposition: namedpipeline: false
Reuse TTL (e.g., 7.00:00:00 for 7 days).
StoreUsersTtl TimeSpan optionalposition: namedpipeline: false
Override TTL for Users snapshots (e.g., 1.00:00:00 for 1 day). Defaults to -StoreTtl.
StrictParity SwitchParameter optionalposition: namedpipeline: false
When set, selects all rules after filtering, skipping interactive selection.
Verbosity VerbosityLevel optionalposition: namedpipeline: falsevalues: 4
Verbosity level: Quiet, Normal, Detailed, Debug Possible values: Quiet, Normal, Detailed, Debug
Possible values: Quiet, Normal, Detailed, Debug
View ConsoleView optionalposition: namedpipeline: falsevalues: 3
Console rendering view: Auto, Standard, Ansi Possible values: Auto, Standard, Ansi
Possible values: Auto, Standard, Ansi

Outputs

TestimoX.Definitions.RuleComplete, TestimoX.PowerShell.StoreReportResult