The GuestConfiguration
PowerShell module provides commands
that assist authors in creating, testing, and publishing
custom content for guest configureation to manage settings
inside Azure virtual machines and Arc-enabled servers.
Tasks that this module automates:
Please leave comments, feature requests, and bug reports in the issues tab for this module.
This is the branch containing the latest release. No contributions should be made directly to this branch. Branch protection is set to require approval from at least one reviewer.
The agent binaries are added to the module when it is published to the PowerShell Gallery. The module will not be functional if it is installed by cloning the GitHub repo.
To install from the PowerShell gallery using PowerShellGet run the following command:
Install-Module -Name GuestConfiguration -Repository PSGallery
The minimum PowerShell version is PowerShell 7.1.3 for Windows and 7.2 preview 6 for Linux.
A full list of changes in each version can be found in the change log
This repository uses git versioning to automatically calculate the newest version of the module. Branches that begin with "feature/" will increment the minor version, and those that begin with "fix" will increment the patch version. Please refer to the GitVersion.yml file for more details.
Steps to build the repository for the first time:
To perform tasks with the GuestConfiguration module, navigate to the GuestConfiguration repository
./build.ps1 -tasks build
./build.ps1 -tasks noop
./build.ps1 -tasks noop -RequiredModules
./build.ps1 -tasks test
./build.ps1 -tasks test -PesterScript [Insert Path to Script]
./build.ps1 -tasks test, build
-RequiredModules
tag
./build.ps1 -tasks noop -RequiredModules
./build.ps1 -tasks build
Import-Module GuestConfiguration -Force
./build.ps1 -tasks test
./build.ps1 -tasks test -PesterScript ./Tests/Unit/Public/foo.tests.ps1
Error Message | Solution |
---|---|
"Sampler does not exist..." | Make sure you are using pwsh7, not PowerShell 5 |
Unable to find Path in Sampler/Invoke-Pester.psm1 | Make sure you only have one copy of Pester on your machine. Get-Module Pester -ListAvailable and delete excess copies. |
Test-GuestConfigurationPackage -Path ../AzureDockerBaseline.zip -Verbose Publish-DscConfiguration: Exception calling "PublishDscConfiguration" with "5" argument(s): "Value cannot be null. (Parameter 'path1')" | Ensure you are using pwsh-preview on a Linux machine |
Failed to initialize DSC Library. | Something could be wrong with the agent. Try deleting the agent on your machine in C:\ProgramData\GuestConfig\ and run Install-GuestConfigurationAgent -Force -Verbose |
A second CIM class definition for 'MSFT_ChefInSpecResource' was found while processing the schema file | PowerShell has loaded a CIM class definition twice in one session. Ignorable. |
File/folder | Description |
---|---|
source |
All source files used to build the module. |
Tests |
Pester tests for evaluating the current quality of the module. |
.gitignore |
Define what to ignore at commit time. |
Tools |
Build scripts to test public PRs using Azure DevOps. |
CODE_OF_CONDUCT.md |
Code of conduct for participating in this community collaboration. |
LICENSE |
The license for the sample. |
README.md |
This README file. |
SECURITY.md |
How to report security issues. |
Please read our CONTRIBUTING.md which outlines all of our policies, procedures, and requirements for contributing to this project. Currently, we cannot accept contributions.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This module is intended to provide guidelines / samples to help authors to create their own configurations and resource modules for use in custom Machine Configuration projects.
Support is best effort via GitHub issues. If there are any questions and comments, we will try to get to them but may not be able to.
We are not currently accepting PRs.
Further, the machine configuration artifact build process is private, so the only feedback we can provide on a public PR is functional testing. We will have to do a full private integration test before merging.