Repository navigation
Getting Started
This page takes you from an empty folder to a run that reports its results, using nothing but the module and a configuration directory on disk.
Install-Module Dsc.PipelineRunner -Scope CurrentUser
Import-Module Dsc.PipelineRunnerThe module exports seven commands. Every one of them has its own generated page under Command Reference:
| Command | What it is for |
|---|---|
Invoke-DscRunner |
The provider-agnostic entry point. Start here. |
Invoke-DscPipelineRunner |
The Azure DevOps-flavoured entry point (PAT/JIT token handling). |
Build-DatumConfiguration |
Compiles a Datum configuration directory into per-node YAML. |
Test-DatumConfiguration |
Validates a configuration's PipelineRunnerSettings version block. |
Resolve-DscDatumProject |
Resolves the Datum project root from a path. |
ConvertTo-DscV3ConfigurationDocument |
Converts pipeline resources to a DSC v3 configuration document. |
Stop-TaskProcessing |
Called from a postExecutionScript to skip the rest of the file. |
A configuration is a Datum repository. The minimum is a
Datum.yml that declares resolution precedence and a PipelineRunnerSettings block, plus at
least one YAML file containing a resources: list.
C:\config\Datum.yml:
ResolutionPrecedence:
- Nodes\$($Node.NodeName)
- Roles\$($Node.Role)
- Baseline
default_lookup_options: MostSpecific
PipelineRunnerSettings:
ConfigurationVersion: 0.5
PipelineRunnerVersion: 1.1.0
Engine: DscV2C:\config\Baseline.yml:
parameters: {}
variables:
LogRoot: C:\Logs
resources:
- name: Log Directory
type: PSDscResources/File
properties:
DestinationPath: $(variables('LogRoot'))
Type: Directory
Ensure: PresentTest is the default mode. Nothing is changed; every resource is evaluated and reported.
$result = Invoke-DscRunner -ConfigurationSourcePath 'C:\config'
$result.Status # Completed / PartialSuccess / Failed / Aborted
$result.PassCount
$result.FailCountInvoke-DscRunner -ConfigurationSourcePath 'C:\config' -Mode Set-ReportPath writes a CSV and a .report.json per configuration file, plus an aggregate
report.json. -FailOnError sets process exit code 1 when the overall status is Failed
or Aborted, so a CI step fails loudly.
New-Item -ItemType Directory -Path .\reports -Force | Out-Null
Invoke-DscRunner -ConfigurationSourcePath 'C:\config' `
-Mode Set `
-ReportPath .\reports `
-FailOnErrorSee Reporting and Exit Codes for the exact shape of every report.
The Git source action clones the repository first, and -ConfigurationRevision pins it.
A full 40-character SHA is verified against the clone's HEAD.
Invoke-DscRunner -Source Git `
-SourceContext @{ Url = 'https://github.com/contoso/config.git'; Token = $pat } `
-ConfigurationRevision '3f1c9a0e5b7d2148ab6c0f39e7d5412ca8b09e6f' `
-Mode TestInvoke-DscRunner -Source Git -SourceContext @{ Url = $repoUrl; Token = $pat } `
-Connect AzureDevOps `
-ConnectContext @{
OrganizationName = 'Contoso'
AuthenticationType = 'PAT'
PATToken = $pat
} `
-Mode SetInvoke-DscPipelineRunner is the same run with the Azure DevOps arguments hoisted into
first-class parameters:
Invoke-DscPipelineRunner -AzureDevopsOrganizationName 'Contoso' `
-ConfigurationSourcePath $repoUrl `
-PATToken $pat `
-Mode Set `
-ReportPath .\reports `
-FailOnErrorThe runner deletes any temporary directory it created. -KeepTemporaryDirectory leaves the
clone and the compiled cache on disk so you can look at the per-node YAML Datum produced.
Invoke-DscRunner -ConfigurationSourcePath 'C:\config' -KeepTemporaryDirectory -VerboseDirectories you supply yourself (-CacheDirectory) are never deleted, switch or no switch.
- Configuration Repository Layout — how a Datum repository is shaped.
- Resource Properties — every key you can put on a resource.
-
Function Language —
variables(),parameters(),reference(),using()and friends. - Execution Lifecycle — exactly what happens to one resource, in order.
- Remote Targets and Credentials — applying configuration to another machine, and which identity the pipeline has to run as for that to be permitted.
Dsc.PipelineRunner 1.1.0 — generated from
the repository on 2026-09-17.
Conceptual pages are authored in WikiSource/; command pages are generated from
comment-based help. Edit those, not the wiki: the wiki is overwritten on every release.