Test-DscConfiguration fails once running against remote machine
Having the following script:
Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
Ensure = "Present" # You can also set Ensure to "Absent"
Name = "TestEnvironmentVariable"
Value = "TestValue2"
Start-DSCConfiguration -Path "SimpleConfig2" -Force -Wait -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred -verbose
$result = Test-DscConfiguration -Path "SimpleConfig2" -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred
The config is applied correctly, yet Test-DscConfiguration fails with the following message:
The configurationData parameter is reserved for future use. The current configuration is used by default.
+ CategoryInfo : InvalidArgument: (root/Microsoft/...gurationManager:String) , CimException
+ FullyQualifiedErrorId : MI RESULT 4
+ PSComputerName : target-machine
I am not able to reproduce your issue. What PS / WMF version are you running into this on? Also what OSes are running on the local and remote machines?
Nick Parrish commented
I ran into the same issue, and it was a result of trying to push a DSC from a Powershell version 5.0 machine to a machine that only had Powershell 4.0 on it. Upgrading the receiving server resolved the issue.