Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

There's more...

The AUOptions value's Value 2 is Notify for download and notify for install. For an explanation of the available options see https://technet.microsoft.com/en-us/library/cc512630.aspx.

For non-domain computers to use your WSUS server, you may update their registry manually. The minimum settings are:

    # Define registry settings
$key = 'HKLM:Software\Policies\Microsoft\Windows\WindowsUpdate'
New-ItemProperty -PropertyType String `
-Path $key `
-Name WUServer -Value 'http://WSUS1:8530'
New-ItemProperty -PropertyType String `
-Path $key `
-Name WUStatusServer -Value 'http://WSUS1:8530'
New-ItemProperty -PropertyType DWord `
-Path "$key\AU"`
-Name UseWUServer -Value 1
# Start looking for updates immediately
Wuauclt /detectnow
You can get full documentation for WSUS registry keys at https://technet.microsoft.com/en-us/library/dd939844(v=ws.10).aspx