Windows updates


#1

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
Prash


#2

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


#3

For AD joining i use something like this

powershell_script ‘register artifactory package source’ do
code 'Register-PSRepository -Name “myNuGetSource” -SourceLocation “https://www.myget.org/F/powershellgetdemo/api/v2” -PublishLocation “https://www.myget.org/F/powershellgetdemo/api/v2/Packages” -InstallationPolicy Trusted’
not_if '(Get-PSRepository -name myNuGetSource -ErrorAction SilentlyContinue) -ne $null’
end

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

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’])
end


#4

hello mike i am using windows update…


#5

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