WSUS: Clients stop reporting after WSUS 3.0 is upgraded to SP1

We're seeing a few instances of the issue below so I thought I'd send out a preemptive heads up.  If you happen to run across this issue at least now you'll know the fix:

========

Problem: After a WSUS 2.0 SP1 or WSUS 3.0 server are upgraded to WSUS 3.0 SP1, you may notice that clients no longer report into the server.  You may also notice the following event in the  application event log after starting the WSUS 3.0 service:

"Event ID: 13042"
"Self-Update is not working"

Cause: The Service Pack 1 upgrade may encounter an issue during setup that results in the virtual directories "ClientWebService" and "Selfupdate" being removed from the Default Web site, and/or "SelfUpdate" being removed under "WSUS Administration".

Resolution: You can manually re-create these virtual directories to resolve the issue or run the script below to rerun the Selfupdate/Clientwebservice install the same way setup does.  If you use the script, copy the text below into a file named rerunSelfupdateSetup.vbs and then copy the vbs file to:

%programfiles%\Update Services\setup

Then just run it with cscript (e.g. C:\Program Files\Update Services\setup>cscript rerunSelfupdateSetup.vbs)

rerunSelfupdateSetup.vbs script:

========

Option Explicit

Dim fileSystemObject, file, text, shell

Set fileSystemObject = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
Set file = fileSystemObject.OpenTextFile("installselfupdateonport80.vbs")

' Read the script in, this causes the SxS code to run. This will end up getting run twice, but it is safe
text = file.ReadAll
file.Close
ExecuteGlobal text

' We need to overwrite this method or itll fail the scipt. We set the variables manually so its safe
text = "Sub ParseArguments" & vbCrLf & "WScript.Echo ""Skipping ParseArguments""" & vbCrLf & "End Sub"
ExecuteGlobal text

' Set the variables that ParseArguments would have
gWusWebSiteIndex = GetWUSWebSiteIndex
szTargetDirPath = shell.ExpandEnvironmentStrings("%programfiles%\Update Services\")

' Debugging, print them out
WScript.Echo "gWusWebSiteIndex: " & gWusWebSiteIndex
WScript.Echo "szTargetDirPath: " & szTargetDirPath

' Run the full SelfUpdate install
WScript.Echo "SetupSelfupdateTree returned: " & SetupSelfupdateTree

========

Mike Johnson | Support Escalation Engineer