Desired State Configuration 2.0
With the release of PowerShell 7.2, the PSDesiredStateConfiguration module is no longer included in the PowerShell package. Separating DSC into its own module allows us to invest and develop DSC independent of PowerShell and reduces the size of the PowerShell package. Users of DSC can enjoy the benefit of upgrading DSC without the need to upgrade PowerShell, accelerating time to deployment of new DSC features. Users that want to continue using DSC v2 can download PSDesiredStateConfiguration 2.0.5 from the PowerShell Gallery.
Users working with non-Windows environments can expect cross-platform features in DSC v3. For more information about the future of DSC, see the PowerShell Team blog.
To install PSDesiredStateConfiguration 2.0.5 from the PowerShell Gallery:
Install-Module -Name PSDesiredStateConfiguration -Repository PSGallery -MaximumVersion 2.99
Be sure to include the parameter MaximumVersion or you could install version 3 (or higher) of PSDesireStateConfiguration that contains significant differences.
Use Case for DSC 2.0
DSC 2.0 is supported for use with Azure Policy's machine configuration. Other scenarios, such
as directly calling DSC Resources with
Invoke-DscResource, may be functional but aren't the
primary intended use of this version.
If you aren't using Azure Policy's machine configuration feature, you should use DSC 1.1.
DSC 3.0 is available in public beta and should only be used with Azure machine configuration (which supports it) or for non-production environments to test migrating away from DSC 1.1.
Changes from DSC 1.1
There are several major changes in DSC 2.0.
The only way to use DSC Resources in 2.0 is with the
Invoke-DscResource cmdlet and Azure Policy's
machine configuration feature.
The following cmdlets have been removed:
The following features have been removed:
- The pull server
- The local configuration manager (LCM)
The following features aren't supported:
- Multi-system DSC Configurations
- Cross-system dependencies (the
- Rebooting behavior for DSC Resources
- Adding parameters to DSC Configuration blocks
- Using flow control statements in DSC Configuration blocks
- Using credentials in DSC Configuration blocks
- Using the ConfigurationData parameter with a DSC Configuration
- Using the
Nodekeyword in a DSC Configuration
- Using composite DSC Configurations (DSC Configurations that nest another DSC Configuration inside them)
Submit and view feedback for