I’ve recently started with Powershell DSC and I’ve tried to use the Package Resource but it just doesn’t finish and I haven’t found anyone else with a similar issue. I’ve included my configuration below and the File Resource works just fine. But the Package Resources just don’t work. In the verbose log for Start-DscConfiguration it reads:
VERBOSE: [LIGHTNINGVM1]: LCM: [ Start Resource ] [[Package]CRedistributable] VERBOSE: [LIGHTNINGVM1]: LCM: [ Start Test ] [[Package]CRedistributable] VERBOSE: [LIGHTNINGVM1]: [[Package]CRedistributable] The package C++ Redistributable is not installed VERBOSE: [LIGHTNINGVM1]: LCM: [ End Test ] [[Package]CRedistributable] in 0.7850 seconds. VERBOSE: [LIGHTNINGVM1]: LCM: [ Start Set ] [[Package]CRedistributable] VERBOSE: [LIGHTNINGVM1]: [[Package]CRedistributable] The package C++ Redistributable is not installed VERBOSE: [LIGHTNINGVM1]: [[Package]CRedistributable] Package configuration starting
And it just stays like that wioth no error messages. There is also a green loading bar at the top saying LCM Applying Configuration, 00:00:02 remaining and it doesn’t finish. I’ve tried commenting out both of the packages and it still behaves the same and with and without product ids. There is no sign of the exe being installed on the target machine. Unfortunately it then gets stuck like this, powershell is still responsive but to be able to run the MOF again I have to restart the target machine otherwise I get cannot ApplyConfiguration error messages, even once it has been restarted I have to use -Force for the config to run because it states that there is already an apply config in process. I have included my config below. I can provide more information if necessary, thanks in advance.
Update: Some more info, I just copied the exe directly to the target machine and used that instead of the network share and it still behaved exactly the same.
Configuration MyTestConfig { Node 10.44.17.118 { File Redis { Ensure = "Present" Type = "Directory“ Recurse = $true SourcePath = "\\networkShare\Share\DscStore\Redis\" DestinationPath = "C:\Deployment\Redis" MatchSource = $true Force = $true } Package CRedistributable { Ensure = "Present" Path = "\\networkShare\Share\DscStore\CRedistributable\vcredist_x64.exe" Name = "C++ Redistributable" ProductId = "" } Package DotNet451 { Ensure = "Present" Path = "\\networkShare\Share\DscStore\dotNet\NDP451-KB2858728-x86-x64-AllOS-ENU.exe" Name = "Microsoft .NET 4.5.1" ProductId = "" } } }