+ Post New Thread
Results 1 to 7 of 7
How do you do....it? Thread, Need to re-initialise WSUS on each PC in Technical; As the title says, after this summers upgrade to W7 and they way its being imaged to each PC I ...
  1. #1
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,883
    Thank Post
    297
    Thanked 120 Times in 101 Posts
    Rep Power
    41

    Need to re-initialise WSUS on each PC

    As the title says, after this summers upgrade to W7 and they way its being imaged to each PC I will need to reset the WSUS id etc on each PC(had to do this at the last school last summer but did it manually on each PC). I have a batch file I can run that does all the re-initailisation, stopping and starting services etc but I would like to do it automatically just the once. Would rather do it without having to resorting to creating a check file and checking its existence etc. Anyone got any ideas, via GPO?

  2. #2
    thesk8rjesus's Avatar
    Join Date
    Sep 2008
    Posts
    107
    Thank Post
    11
    Thanked 6 Times in 6 Posts
    Rep Power
    14
    You could always create a batch file that looks at a CSV and pulls the names of each machine and then using psexec run the batch file all from one location just set it going come back later

  3. #3
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,883
    Thank Post
    297
    Thanked 120 Times in 101 Posts
    Rep Power
    41
    Hmmm, not thought of that way!, but that requires them all to be on at the same time and that's unfortunately not always guaranteed, but thanks anyway. All the PC's have yet to be joined to the domain so may get the technician to just run the script after they have done that if I cant get it sorted.

  4. #4
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    999
    Thank Post
    198
    Thanked 144 Times in 102 Posts
    Rep Power
    36
    Did your machines get sys prepped
    Last edited by round2it; 29th July 2013 at 08:54 PM.

  5. #5

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    Post your script up here. We could set it so that you make it a startup script and it runs only once on each machine.

  6. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,763
    Thank Post
    3,273
    Thanked 1,053 Times in 974 Posts
    Rep Power
    365
    What remote control software do you use ie ab tutor / Impero etc ?

    What about making it write and create a registry key and get it to check that key to see if it exists. If not then run the code if it does then ignore it ?

    Upon it successfully running the code make it

    1) create the registry key on the machine that it was run on
    2) append to a log file thats located in sysvol or netlogon share any info u want to record ie machine name , date time

    Once you know all machines have been done by looking at the log file you could adjust it to delete the registry key and to ignore or delete the other code so it only deletes that one reg key
    Last edited by mac_shinobi; 29th July 2013 at 10:16 PM.

  7. #7

    Join Date
    Jan 2008
    Location
    Cheshire, UK
    Posts
    340
    Thank Post
    68
    Thanked 60 Times in 42 Posts
    Rep Power
    48
    This is the script I use for this purpose. I set it as a start up script in a GPO. As @mac_shinbobi suggests you could have it logging to a file somewhere and the modification would not take much effort to add.

    Code:
    'Action: Fixes a problem where the SusClientId registry entry is the same on several client workstations.
    '        If SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\SUSClientIdReset = 1. If so then quit
    '        Otherwise delete
    '        SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\SUSClientId
    '	 SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\SUSClientIdValidation
    '        Stop and restart the wuauserv service
    '	 Force wuauclt to check for updates.
    
    Dim objShell, strKeyPath, strValueName,strComputer
    
    set objShell = wscript.createObject("wscript.shell")
    
    const HKEY_LOCAL_MACHINE = &H80000002
    
    strComputer = "."
    
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
    
    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
    strValueName = "SUSClientIdReset"
    
    
    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, dwValue
    IF (dwValue = "5") THEN
                'do nothing
          ELSE 
                'Fixes problem with client machines not showing up on the server due to imaging method
                objRegistry.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,"SusClientId"
                objRegistry.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,"SusClientIdValidation"
    
       Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service where Name = 'wuauserv'")
    
       For Each objService in colServiceList
        If objService.State = "Running" Then
        objService.StopService()
        Wscript.Sleep 10000
        objService.StartService()
        End If
       Next
       
                objShell.Run("wuauclt /resetauthorization /detectnow ")
       	    Wscript.Sleep 10000   
                objShell.Run("wuauclt /r /reportnow")
    
                'Set reg value for SUSClientIdReset for checking against later.
       dwValue = "5"
                objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, dwValue
    End If

  8. 2 Thanks to sjatkn:

    mac_shinobi (29th July 2013), TechSupp (29th July 2013)

SHARE:
+ Post New Thread

Similar Threads

  1. Need to blacklist windows updates on 8e6
    By juventus in forum Windows
    Replies: 17
    Last Post: 14th November 2008, 11:10 PM
  2. script needed to kick start WSUS clients
    By projector1 in forum Scripts
    Replies: 3
    Last Post: 12th March 2008, 09:55 AM
  3. Script Need to check disk space on remote servers
    By screwuphead in forum Scripts
    Replies: 8
    Last Post: 26th November 2007, 05:28 PM
  4. Replies: 11
    Last Post: 6th September 2007, 07:10 PM
  5. Dell To Offer Win XP On Consumer PCs Again
    By Geoff in forum IT News
    Replies: 1
    Last Post: 20th April 2007, 09:16 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •