Here is the situation. On a freshly installed W2012R2 server I have configured this:
- 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?
Also I posted this to connect: https://connect.microsoft.com/PowerShell/Feedback/Details/1251766