These three modules all implement various PowerShell DSC resources:
Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName xPSDesiredStateConfiguration Import-DscResource -ModuleName PSDscResources
Here are the differences:
- PSDesiredStateConfiguration is the built-in module that ships in Windows as part of PowerShell 4.0.
- xPSDesiredStateConfiguration is an experimental version of the built-in module.
- PSDscResources is a non-experimental upgrade of the built-in module.
Here are my standard practices for which to import:
- Start with PSDesiredStateConfiguration.
- Upgrade to PSDscResources if you need a feature the built-in module doesn’t have.
- Test with xPSDesiredStateConfiguration if things still aren’t working. Avoid using this module in production.
Arguably, it’s a good practice to upgrade to PSDscResources by default. I don’t do that because using the built-in module reduces the number of things I have to install and I like short dependency chains. So far, my use-cases have been simple and the built-in module has been sufficient. Your situation may be different.
Need more than just this article? We’re available to consult.
You might also want to check out these related articles: