Use the windows_hotfix Chef InSpec audit resource to test if the hotfix has been installed on a Windows system.
This resource is distributed along with Chef InSpec itself. You can use it automatically.
This resource first became available in v1.39.1 of InSpec.
A windows_hotfix resource block declares a hotfix to validate:
describe windows_hotfix('name') do
it { should be_installed }
end
where
('name') must specify the name of a hotfix, such as 'KB4012213'
be_installed is a valid matcher for this resourceThe following examples show how to use this Chef InSpec audit resource.
describe windows_hotfix('KB4012213') do
it { should be_installed }
end
describe windows_hotfix('KB9999999') do
it { should_not be_installed }
end
For a full list of available matchers, please visit our matchers page.
The be_installed matcher tests if the named hotfix is installed on the system:
it { should be_installed }
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/windows_hotfix/