Okay, I left for several hours, got some food, and some sleep. Came back and tried this:
Code:
Break On
$wuKey = '\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
$auKey = '\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU'
$domain = getobject('WinNT://' + @domain)
$domain.Filter = split('Computer')
$Index = 0
for each $computer in $domain
If $Computer
writevalue('\\' + $computer.Name + $wuKey,'WUServer','http://31meushares','reg_sz')
writevalue('\\' + $computer.Name + $wuKey,'WUStatusServer','http://31meushares','reg_sz')
writevalue('\\' + $computer.Name + $auKey,'UseWUServer','1','reg_dword')
? ' ' + $Index + ' ' + $computer.Name
$Index=$Index+1
endif
It worked like a charm. Honestly, I don't know what I did wrong before. I probably fat fingered something and was too tired to notice.
Many thanks are in order to you fellows. I couldn't have done this without your help. Thank you very much.
USMCnerd