Sign in to follow this  
Followers 0
big_daddy

Wsus Fix!

4 posts in this topic

#1 ·  Posted (edited)

I've been having issues with several computers dropping off our WSUS. So I did some research and this seems to do the trick.

For those of you that don't know WSUS stands for "Windows Server Update Services".

$RegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\"

; Check for marker
$IDDeleted = RegRead($RegKey, "IDDeleted")

; To make for sure values are only deleted once
If $IDDeleted <> "yes" Then
    
; Delete values
    RegDelete($RegKey, "AccountDomainSid")
    RegDelete($RegKey, "PingID")
    RegDelete($RegKey, "SusClientId")
    
; Stop and start the Automatic Updates Service
    RunWait(@SystemDir & "\net.exe stop wuauserv", "", @SW_HIDE)
    RunWait(@SystemDir & "\net.exe start wuauserv", "", @SW_HIDE)
    
; Run wuauclt.exe with resetauthorization
    Run(@SystemDir & "\wuauclt.exe /resetauthorization /detectnow")
    
; Create marker
    RegWrite($RegKey, "IDDeleted", "REG_SZ", "yes")
EndIf
Edited by big_daddy

Share this post


Link to post
Share on other sites



I've been having issues with several computers dropping off our WSUS. So I did some research and this seems to do the trick.

Hi,

Can you explain in details what this script do ?

We also use the WSUS server and we have another problem with our test computer. Often i set up test computer with Vmware Workstation, these test computer does not need to be registered with the WSUS server because they are "alive" only few times... I discovered AutoIt and found it's a great and very usefull language. I also like the way it's compiled (tiny .exe)... great.

Thank you for this script.

Share this post


Link to post
Share on other sites

Hi,

Can you explain in details what this script do ?

We also use the WSUS server and we have another problem with our test computer. Often i set up test computer with Vmware Workstation, these test computer does not need to be registered with the WSUS server because they are "alive" only few times... I discovered AutoIt and found it's a great and very usefull language. I also like the way it's compiled (tiny .exe)... great.

Thank you for this script.

This problem usually occurs with cloned computers, so it deletes what should be the "unique" id's for windows update from the registry, then runs a command to recreate them.

As far as making the computers not show up in WSUS. I would suggest creating a new group policy for those computers, and just leave the WSUS part out.

Share this post


Link to post
Share on other sites

Should the wuauserv service be set to Manuel or Automatic for wsus 3.0 sp1 client side? By default mine is set to Manuel.

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0