Powershell DSC: Unable to load module xPSDesiredStateConfiguration

Responding to a comment to my original question, I checked that the module was being listed when executing Get-Module -ListAvailable. I noticed that when I ran the command it was listing the directory containing the module twice. I then realized that while trying to solve an earlier problem I had added the $env:ProgramFiles\WindowsPowerShell\Modules directory to the PSModulePath environment variable, so the modules were being duplicated and causing problems. After removing the path from the PSModulePath environment variable, everything works!

Tags:

Powershell

Dsc