Avatar of Irrylyn
Irrylyn asked on

Script to get WSUS server from Local Group Policy and Registry

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.

Thank you!!
PowershellVB ScriptWindows Batch

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Rob...  you continue to blow my mind, as always.  Every time I see your name on one of my questions I breath a little easier because I know you hit the nail on the head every single time!  I hope you really love what you do, because you're awesome!

The above vbs worked without a hitch.  No changes/modifications were needed.  Beautiful.  Thank you, this is helping me to verify an issue we've been having and now I can begin figuring out the cause/fix!

Perfect script.

Great.  Thanks for the grade.  I do love the things we can do with scripting, which is why I've been using it for more than 8 years now.  It can make life much easier!

Glad it worked for you.


I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck