Skip to main content

PowershellInstallPackage

All Cookstyle Cops


The department is: Chef/Modernize

The full name of the cop is: Chef/Modernize/PowershellInstallPackage


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNo12.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

NameDefault valueConfigurable values
Version Added5.5.0String
Exclude
  • **/metadata.rb
Array

Was this page helpful?