Windows updates

Greetings Professionals,

Im looking for a recipie or cookbook to run Windows update on node and also restart is required/ and also Joining the Server to Active Directory.

Please help me…!

Thank you

Hi Prash,
Are you using wsus or windows update?
I use this cookbook for wsus

For AD joining i use something like this

powershell_script ‘register artifactory package source’ do
code 'Register-PSRepository -Name “myNuGetSource” -SourceLocation “” -PublishLocation “” -InstallationPolicy Trusted’
not_if '(Get-PSRepository -name myNuGetSource -ErrorAction SilentlyContinue) -ne $null’

powershell_script ‘xComputerManagement’ do
code 'install-module xComputerManagement -force’
not_if '(Get-Module xComputerManagement -list) -ne $null’

account = Chef::DataBagItem.load(‘ad_join’, ‘admin’)

dsc_resource ‘Join Domain’ do
resource :xComputer
property :DomainName, 'xxx,com’
property :Name, node[‘hostname’]
property :JoinOU, 'OU=…DC=com’
property :Credential, ps_credential(account[‘ad_joinuser’], account[‘ad_joinpass’])

hello mike i am using windows update…

ad-join works for me for joining computers do the domain.

1 Like