Skip to main content

Chef/Modernize/PowershellInstallPackage

Cookstyle cops page

The Cookstyle cops department: Chef/Modernize

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
Include
    Array

    Thank you for your feedback!

    ×











    Search Results