PowershellInstallPackage
The department is: PowershellInstallPackage
The full name of the cop is: Chef/Modernize/PowershellInstallPackage
Enabled by default | Supports autocorrection | Target Chef Version |
---|---|---|
Enabled | No | 12.16+ |
Use the powershell_package resource built into Chef Infra Client instead of the powershell_script resource to run Install-Package
correct
powershell_package ‘docker’
Examples
incorrect
powershell_script 'Expand website' do
code 'Install-Package -Name docker'
end
Configurable attributes
Name | Default value | Configurable values |
---|---|---|
Version Added | 5.5.0 | String |
Include | Array |