Script to get WSUS server from Local Group Policy and Registry
Posted on 2013-09-04
Environment: All Windows 7 x64 Enterprise
SCCM 2007 R2 & SUP for updates
Hi experts!! (aka my favorite people!)
I have a computerlist.txt with about 200 computer names in it. I would like a script that will check the value of the following two entries and then output it to a file:
In Registry: HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate : the Data value for WUServer.
In Local Group Policy: Computer Configuration\Administrative Templates\Windows Components\Windows Update\Specify Intranet Update Service Location : the value of option 'Set the intranet update service for detecting updates'
I would love both to be done, but if it's not possible to get the value from the Local Group Policy, I will be ok with just the registry key.