Fix DSC error: Unable to load module ‘xPSDesiredStateConfiguration’: module not found


When you try to configure a DSC HTTP Pull server, you may have the following error:

1
Unable to load module 'xPSDesiredStateConfiguration': module not found

Run the following command:

1
$env:PSModulePath

Making sure at least one of the appeared paths contains the xPSDesiredStateConfiguration module.
Normally, you will find out you have the module installed, and the zip file appears in one of the above paths.

In this case, you need to unblock the zip file, and copy the files under the zip, and paste them into the same directory (the same level of the zip), and run the configuration again. It will pass thru.