Skip to main content

WindowsVersionHelpers

The department is: WindowsVersionHelpers

The full name of the cop is: Chef/Deprecations/WindowsVersionHelpers

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYes14.0+

Use node[‘platform_version’] and node[‘kernel’] data instead of the deprecated Windows::VersionHelper helpers from the Windows cookbook.

Examples

incorrect

Windows::VersionHelper.nt_version
Windows::VersionHelper.server_version?
Windows::VersionHelper.core_version?
Windows::VersionHelper.workstation_version?

correct

node['platform_version'].to_f
node['kernel']['product_type'] == 'Server'
node['kernel']['server_core']
node['kernel']['product_type'] == 'Workstation'

Configurable attributes

NameDefault valueConfigurable values
Version Added5.4.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results