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.
- 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
This project has adopted this Code of Conduct.
Please check out common DSC Community contributing guidelines and our contributing guide.
A full list of changes in each version can be found in the change log.
- 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.
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)
- 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 PlasterAfter 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.
You can review the Examples directory for example DSC resource configurations.
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├── .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