Why can't DSC find a resource that's installed?
The version of the module the DSC resources are part of was different between my local computer and the server. On my local computer, where my configuration gets converted to MOF files, I had version 2.2.0 (code snipped for brevity):
instance of ******** as $********1ref
{
ModuleName = "********";
ModuleVersion = "2.2.0";
};
But the server had version 2.1.0:
> Get-Module -ListAvailable
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.1.0 ******** ********
This particular module is available on the PowerShell Gallery. Calling Update-Module
got the latest version onto my server. I also could have downgraded my local computer.
I ran into the same issue...it turns out my problem wasn't a module version mismatch, but a Powershell version mismatch. My workstation is version 5, but the end-point was version 4 (2012 R2 out the box).
After installing WMF 5.1 on the remote sever, it recognized and installed IIS using the xWebAdministration module.
Before that it was complaining it couldn't find it. The path variable was the same on another configured web server. Only difference was the Powershell version.