I am writing chef cookbook to add/enable some of the windows feature. For enabling I am using powershell_script
resource and below is the powershell script.
Import-Module Servermanager
Add-WindowsFeature Print-LPD-Service
For some reason, during chef-client run windows feature is not enabled. But the recipe ran successfully.
When I manually executed the command in powershell shell it works fine.
I am not aware of any security settings to be enabled to achieve this requirement. So, how we can enable windows feature using chef. Any pointers will be helpful.