Here is the situation. On a freshly installed W2012R2 server I have configured this:
Computername
VMware Tools Installed
DSC resource xNetworking copied inside the VM ( it’s a VMware VM, and the resource is copied using the PowerCLI cmdlet Copy-VMGuestFile )
Made a mof which configures the IP settings in the VM.
When executing Start-DscConfiguration -Wait -Force -Path . -Verbose the first time, all is working as expected. The IP settings get configured. But, as I’m testing some stuff in this particular case, I’m modifying the mof file a lot of times, and I am setting the configuration on the NIC back to DHCP, so that it can get configured again.
Then when executing Start-DscConfiguration -Wait -Force -Path . -Verbose again, I am receiving random error messages ( see also the attached screenshot ):
Error Message 1:
“PowerShell DSC resource MSFT_xIPAddress failed to execute Test-TargetResource functionality with error message: Cannot set or find valid IPAddress using InterfaceAlias Ethernet and AddressFamily IPv4”
Error Message 2:
“The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error: HRESULT 0x800706be”
After a few tries applying the configuration with Start-DscConfiguration, the configuration gets suddenly applied.
What I noticed, if I delete all *.mof in C:\Windows\System32\Configuration, the push action executes successfully all the time.
Not sure if this a bug, or that I am doing something wrong and the described behaviour is expected?
Keep in mind that DSC’s “use case” isn’t really quickly and repetitively running the configuration; it “wants” to do it only every 30 minutes or more. So you may just be running into transitional states that, in a normal production environment, wouldn’t be a thing.
It won’t accept values under 30 minutes. That’s the hardcoded minimum. You can have it check a pull server every 15 minutes, but running the config is a half-hour.
Ok, then I have a little challenge to solve. Can you give me some advice to look at, on how to test MOF files in a rapid way? Is Pester suitable for this in your opinion?
But the MOF syntax isn’t often the problem. What I do is test inside a VM, and I have a snapshot that I take just before I shove the MOF into the VM. That way I can roll back easily, run Start-DscConfiguration, and it’ll “take” immediately since DSC hasn’t been running.
Hi All,
I am also facing the same issue. I am using push method for configuration. My DSC is renaming the computer and installing ADC on aws instance. Rename works very well but after the restart the configuration of ADC(Secondary DC in Domain) fails with this error-
powershell.exe : The WS-Management service cannot process the request. The WMI
service or the
At line:1 char:1
+ CategoryInfo : NotSpecified: (The WS-Manageme...service or the
:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
WMI provider returned an unknown error: HRESULT 0x800706be
Error code 0x800706be generally indicates that Local Configuration Manager crashed.
Are you using disconnected session (Disconnect-PSSession) in any of the resource? If you are then this is a known issue in WMF 5.0 RTM.
Hi Nitin,
Did you ever face this issue or did you work on this type of issue ?
For your kind information i want to let you know that Windows 2012R2 release comes with all these WMF4.0 updates preinstalled. Thanks for response.
Hi Lokesh,
It is both. Good to know. This KB came way later than 2012R2 RTM, may be now it is pre-installed in newer images.
I have occasionally seen crashes where if the configuration is compiled on WMF 5.0 RTM (or equivalent) and sent to nodes with WMF 4.0. So far I have not found any way out of it other than doing compilation also on WMF 4.0 node.