Skip to main content

WindowsVersionHelpers

The department is: WindowsVersionHelpers

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

Enabled by default Supports autocorrection Target Chef Version
Enabled Yes 14.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

Name Default value Configurable values
Version Added 5.4.0 String
Include
Array

Was this page helpful?

×









Search Results