Trying to deploy a simple dsc mof to a test environment. This is a new 2012 R2 lab server. I created a simple configuration script using xComputerManagement and xPSDesiredStateConfiguration.
Configuration StandardWeb{ param( [parameter(Mandatory=$true)] [String] $computerName #[Parameter(Mandatory)] #[pscredential]$domainCredential ) #Import the required DSC Resources Import-DscResource -Module xComputerManagement Import-DscResource -Module xPSDesiredStateConfiguration Node $computerName{ WindowsFeature WEBRoles{ Name = {'FileAndStorage-Services','File-Services','FS-FileServer','Storage-Services','Web-Server'} Ensure = 'Present' } xComputer SetComputerName{ Name = $computerName } xService DisableFirewallService{ Name = 'Windows Firewall' State = 'Stopped' StartupType = 'Disabled' } } } StandardWeb -OutputPath C:\
The mof file creates just fine. On the test server, I download and install the WMF 5 preview, along with the DSC Resource Kit Wave 10 and extract the modules. I’ve tried putting the modules in both places, C:\Program Files\WindowsPowerShell\Modules and C:\Windows\System32\WindowsPowerShell\v1.0\Modules.
Each time I try to start-dscconfiguration on the mof I get the following error.
The PowerShell DSC resource MSFT_RoleResource from module does not exist at the PowerShell module path nor is it registered as a WMI DSC resource. + CategoryInfo : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException + FullyQualifiedErrorId : DscResourceNotFound + PSComputerName : IMWTEST1
I realize this is telling me that the psDesiredStateConfiguration module isn’t there, but I can do a get-dscresource and see that it is indeed there. Both the xPsDesiredStateConfiguration and the regular PSDesiredStateConfiguration.
Can someone offer some assistance in tracking down why this server can’t seem to find either of these modules?