XOAPWindowsConfigDSC
February 18, 2026 · View on GitHub
This repository is a template that can be used as a starting point for creating new DSC (Desired State Configuration) modules and composite resources for PowerShell.
Features
- Modern Build System: Uses Sampler framework with InvokeBuild
- Automated Testing: Pester 5.x integration with code coverage
- CI/CD Ready: Comprehensive GitHub Actions workflows
- Quality Assurance: PSScriptAnalyzer with HQRM tests
- Quick Scaffolding: Automated resource and module generation
- VS Code Integration: Tasks, debugging, and code analysis
Code of Conduct
This project has adopted this Code of Conduct.
Contributing
Please check out common DSC Community contributing guidelines and our contributing guide.
Change log
A full list of changes in each version can be found in the change log.
Documentation
Quick Start
Option 1: Use as GitHub Template (Recommended)
- Click the "Use this template" button at the top of this repository
- Create your new repository with your desired name
- Clone your new repository locally
- Run the initialization script:
.\Initialize-ModuleTemplate.ps1 -ModuleName "WindowsConfig" -Author "Your Name" -CompanyName "Your Company"
This will rename everything from XOAPWindowsConfigDSC to your module name.
Option 2: Manual Setup
If you prefer manual setup or want to understand the process:
- Clone/fork this repository
- Manually rename files and update references
- Update the module manifest (.psd1 file)
Prerequisites
- PowerShell 5.1 or PowerShell 7.x
- Plaster module (minimum version 1.1.3)
Install Plaster if not already present:
Install-Module -Name Plaster -MinimumVersion 1.1.3 -Scope CurrentUser
Import-Module Plaster
Creating Your First DSC Resource
After initializing your module, create DSC resources using:
.\New-CompositeResource.ps1 -Module "WindowsConfig" -Version "1.0.0" -Resource "RegistrySettings"
Parameter Details:
| Parameter | Description | Required |
|---|---|---|
| Module | Name of your module (without XOAP prefix) | Yes |
| Version | Version of the module | Yes |
| Resource | Name of the DSC resource to create | Yes |
| Company | Company name (default: RIS AG) | No |
Note: The script automatically adds the XOAP prefix and DSC suffix to your module name.
Examples
You can review the Examples directory for example DSC resource configurations.
Building and Testing
See BUILD.md for detailed build and test instructions.
Quick commands:
# Resolve dependencies and build
.\build.ps1 -ResolveDependency -Tasks build
# Run tests
.\build.ps1 -Tasks test
# Package module
.\build.ps1 -Tasks pack
Repository Structure
├── .build/ # Custom build tasks
├── .github/ # GitHub templates and workflows
├── .vscode/ # VS Code configuration
├── source/ # Module source code
│ ├── DSCResources/ # DSC resources
│ ├── Public/ # Public functions
│ ├── Private/ # Private functions
│ ├── Classes/ # PowerShell classes
│ └── Examples/ # Usage examples
├── tests/ # Test files
│ ├── Unit/ # Unit tests
│ ├── Integration/ # Integration tests
│ └── QA/ # Quality assurance tests
├── build.ps1 # Main build script
├── build.yaml # Build configuration
└── RequiredModules.psd1 # Module dependencies