Jump to content

Wsus Fix!


big_daddy
 Share

Recommended Posts

  • Moderators

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
Link to comment
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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • 2 years later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...