*WARNING: Failed to obtain SusClientId

I was troubleshooting one of the Automatic Update Client which was not updating from the Software Update Services Server. Scanning thru WindowsUpdate.log file, it reported a warning as below;

11/29/2005 12:48:42   Agent     * WARNING: Failed to obtain SusClientId  

So, Immediately I checked the registry for SusClientId value from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate and I found it missing as rightly reported in WindowsUpdate.log file. Now, the question is how to re-generate SusClientId value. There might be some other useful tricks but the best I found is hitting http://windowsupdate.com and scan for the patches and when it was complete, I again checked in the registry and wow SusClientId value was re-generated and it succesfully updated from the Software Update Services Server. 

Timeout Approving Updates in WSUS/ Approving updates takes long time in WSUS


Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


The text of the message is:

“Windows Server Update Services error — Web Page Dialog Windows Server Update Services encountered an error.

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

[Show Details] [Close]”

You see the following information in “Show Details”, :

“System.Data.SqlClient.SqlException: Timeout expired.  The timeout period
elapsed prior to completion of the operation or the server is not responding.
Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnectio­ns(SqlException e) 
   <snip> updateId, Int32 revisionNumber, Int32 deploymentAction, Guid targetGroupId,
String adminName, DateTime deadline, Boolean isAssigned, DateTime goLiveTime,
Int32 downloadPriority, Guid deploymentGuid, Boolean translateSqlException) 
at Administration.Updates.UpdateXPost.Page_Load(Object sender, EventArgs

Response from Rajiv Poonamalli [MSFT]:

We are currently in the process of addressing some of the performance issues in this area. The steps below would fix part of the performance problems you
are facing. Please try these on your server and let us know if it solves the timeout issues.

1) Save addDeploymentIndex.sql to disk on the Windows Server Update Services server
2) As administrator, run the following command.
 osql -E -S <SQL instance name> -n -b -i addDeploymentIndex.sql

The osql utility can be found under the “%ProgramFiles%\Update Services\Tools\osql” folder. Provide the servername with the -S parameter. [Replace <SQL instance name with your SQL server if you are using SQL or %computername%\WSUS if you are using WMSDE]

Content of addDeploymentIndex.sql:

IF NOT EXISTS (SELECT * FROM sysindexes where name=’nc7DeploymentRevision’)
     CREATE NONCLUSTERED INDEX nc7DeploymentRevision ON dbo.tbDeployment(RevisionID, TargetGroupID, ActionID)


Note that the text starting with “CREATE NONCLUSTERED ” between the
END block needs to be one single long line, it will wrap over two
lines in this post.

If the WSUS server database (SUSDB) is not on the default SQL server instance on the machine, It is probably on a named instance. Look at the following registry key to find out which SQL server/MSDE server you have to run the command at.

HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName

You can replace the value of this key for the place holder in the command below.

David Hennessey (MSFT)

As for what this does, we found that the reason the approvals were taking so long was the query plan that SQL was choosing when we delete approvals in the DB (of course, the reason we are deleting approvals at all is another story, but that is something we’ll try to fix in SP1) was quite inefficient because one of the pieces of data we were querying on wasn’t indexed properly.

Creation of that index allows SQL to choose a much more performant query plan and in our tests reduced the deployment delete time ‘significantly’.

Synchronize WSUS Replica (slave) Server from the Command Line

Scripting guru Torgeir Bakken’s response;

Torgeir Bakken (MVP):

It is easy to create this command line utility yourself. WSUS expose .NET API’s that can be called from VB.NET, C#.NET, or other .NET languages.

The easiest way to develop .NET programs is to use Visual Studio, but VS is not required. The .NET Framework ships with all the basic tools necessary for building .NET programs.

To get a tool that starts a WSUS synchronization, do the following on the WSUS server:

1) Copy the code below and save it to a text file named

2) Open a command prompt, and navigate to the directory containing

3) Run the following command line (all one one line, you will need to
unwrap the line before running it!):

  StartSynchronization.vb /r:”%PROGRAMFILES%\Update Services\

This will create a tool called StartSynchronization.exe that when run
will start a WSUS synchronization.

Content of StartSynchronization.vb:

Imports Microsoft.UpdateServices.Administration

Module StartSynchronization

     Sub Main()
         Dim server As IUpdateServer
         Dim subscription As ISubscription

         ‘connect to the local server
         server = AdminProxy.GetUpdateServer

         subscription = server.GetSubscription()

     End Sub

End Module


More WSUS API information/examples:

“Windows Server Update Services API Samples and Tools” is available for
download here:



Platform SDK: Windows Server Update Services

Scripts to query installed Service Packs, Patches/updates and Hotfixes

There are many known scripts which use WMI class Win32_QuickFixEngineering to enumerate hotfixes installed on a computer. These scripts can give you a list of installed updates like;


This Script reports installed updates that are installed with Windows Update (v5) technology and the result will be written to %temp%\UpdateHistory.txt and then launched in Notepad.

USAGE: Cscript //nologo WUhistory.vbs

The output will look like;

Report run at 4/23/2006 2:42:14 PM
Title:   Security Update for Windows XP (KB908531)
Description:  A security issue has been identified in Windows Explorer that could allow an attacker to compromise your Windows-based system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer.
Date/Time in GMT: 4/18/2006 7:47:14 AM
Install mechanism: AutomaticUpdates
Install status:  Succeeded

‘ Script that reports installed updates that are
‘ installed with Windows Update v5 technology

‘ Result will be written to %temp%\UpdateHistory.txt
‘ and then launched in Notepad

‘ Author: Torgeir Bakken
‘ Date 2004-08-12

Option Explicit

Const OverwriteIfExist = -1
Const OpenAsASCII   =  0

Dim oWU, iTHCount, colUpdate, oUpdate, sStatus, iTotal
Dim iSuccess, iFailed, iAborted, iUnknown, sErrorCode
Dim oFSO, oShell, sFile, f

On Error Resume Next
Set oWU = CreateObject(“Microsoft.Update.Searcher”)

If Err.Number <> 0 Then
   MsgBox “WU5 programming interface does not exist.”, _
          vbInformation + vbSystemModal, “Update history”
End If
On Error Goto 0

iTHCount = oWU.GetTotalHistoryCount
If iTHCount > 0 Then

   Set oFSO = CreateObject(“Scripting.FileSystemObject”)
   Set oShell = CreateObject(“Wscript.Shell”)
   sFile = oShell.ExpandEnvironmentStrings(“%TEMP%”) & “\UpdateHistory.txt”
   Set f = oFSO.CreateTextFile(sFile, _
                      OverwriteIfExist, OpenAsASCII)

   iTotal = 0
   iSuccess = 0
   iFailed = 0
   iAborted = 0
   iUnknown = 0

   f.WriteLine “Report run at ” & Now
     f.WriteLine “———————————” _
           & “———————————”

   Set colUpdate = oWU.QueryHistory(0, iTHCount)

   For Each oUpdate In colUpdate
     f.WriteLine “Title:” & vbTab & vbTab & vbTab & oUpdate.Title
     f.WriteLine “Description:” & vbTab & vbTab & oUpdate.Description
     f.WriteLine “Date/Time in GMT:” & vbTab & oUpdate.Date
     f.WriteLine “Install mechanism:” & vbTab & oUpdate.ClientApplicationID

     sErrorCode = “”
     Select Case oUpdate.ResultCode
       Case 2
         sStatus = “Succeeded”
         iSuccess = iSuccess + 1
       Case 4
         sStatus = “Failed”
         iFailed = iFailed + 1
         sErrorCode = oUpdate.UnmappedResultCode
       Case 5
         sStatus = “Aborted”
         iAborted = iAborted + 1
       Case Else
         sStatus = “Unknown”
         iUnknown = iUnknown + 1
     End Select

     If sStatus = “Failed” Then
       f.WriteLine “Install error:” & vbTab & vbTab & sErrorCode
     End If

     f.WriteLine “Install status:” & vbTab & vbTab & sStatus
     f.WriteLine “———————————” _
           & “———————————”

     iTotal = iTotal + 1

   f.WriteLine “Total number of updates found: ” & iTotal
   f.WriteLine “Number of updates succeeded: ” & iSuccess
   f.WriteLine “Number of updates failed: ” & iFailed
   f.WriteLine “Number of updates aborted: ” & iAborted

   oShell.Run “notepad.exe ” & “””” & sFile & “”””, 1, False

   MsgBox “No entries found in Update History.”, _
          vbInformation + vbSystemModal, “Update history”

End If


This script enumerate hotfixes installed on a computer and outputs some computer information.

USAGE: Cscript //nologo HotfixHistory.vbs > HotfixHistory.txt

The output will look like;

Hotfix report date: 4/23/2006 2:45:19 PM

OS version: Microsoft Windows XP Professional
SP version: Service Pack 2
OS language: English

HotFixID: KB873339
Description: Windows XP Hotfix – KB873339
InstalledBy: Administrator
InstallDate: 12/11/2005

‘ Description: Script that outputs some computer information
‘ and lists all installed hotfixes including installation date

‘ Author: Torgeir Bakken
‘ Date: 2004-10-19

Wscript.Echo “Hotfix report date: ” & Now & vbCrLf

strComputer = “.”   ‘ use “.” for local computer

Const HKLM = &H80000002

‘On Error Resume Next
Set objWMIService = GetObject(“winmgmts:” _
        & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)

Set colSettings = objWMIService.ExecQuery _
        (“Select * from Win32_OperatingSystem”)

‘ get general info about the OS

‘ Caption value for different OS:
‘ Microsoft Windows 2000 …
‘ Microsoft Windows XP …
‘ Microsoft(R) Windows(R) Server 2003, ….. Edition
For Each objOperatingSystem in colSettings
    strOSCaption = objOperatingSystem.Caption
    Select Case True
      Case InStr(1, strOSCaption, “windows 2000”, vbTextCompare) > 0
        strOS = “Windows 2000”
      Case InStr(1, strOSCaption, “windows xp”, vbTextCompare) > 0
        strOS = “Windows XP”
      Case InStr(1, strOSCaption, “windows(r) server 2003”, vbTextCompare) > 0
        strOS = “Windows Server 2003”
    End Select

    intOSLang = objOperatingSystem.OSLanguage
    strOSLangHex = Right(“000” & Hex(intOSLang), 4)
    strOSServicePack = objOperatingSystem.CSDVersion

Set objReg = GetObject(“WinMgmts:{impersonationLevel=impersonate}!//” _
              & strComputer & “/root/default:StdRegProv”)

strOSLanguage = “Unknown”  ‘ Init value
strKeyPath = “SOFTWARE\Classes\MIME\Database\Rfc1766”
strValueName = strOSLangHex
objReg.GetStringValue HKLM, strKeyPath, strValueName, strOSLanguage

‘ remove unnecessary stuff
arrOSLanguage = Split(strOSLanguage, “;”)
strOSLanguage = arrOSLanguage(UBound(arrOSLanguage))
If Instr(strOSLanguage, “(“) > 0 Then
    arrOSLanguage = Split(strOSLanguage, “(“)
    strOSLanguage = Trim(arrOSLanguage(0))
End If

Wscript.Echo “OS version: ” & strOSCaption
Wscript.Echo “SP version: ” & strOSServicePack
Wscript.Echo “OS language: ” & strOSLanguage

‘ start enumeration of hotfixes

Wscript.Echo vbCrLf & “Hotfixes Identified:”

strRegBaseUpdate = “SOFTWARE\Microsoft\Updates\” & strOS

Set colItems = objWMIService.ExecQuery _
        (“Select * from Win32_QuickFixEngineering”,,48)

For Each objItem in colItems
    If objItem.HotFixID <> “File 1” Then
       Wscript.Echo “HotFixID: ” & objItem.HotFixID
       Wscript.Echo “Description: ” & objItem.Description
       Wscript.Echo “InstalledBy: ” & objItem.InstalledBy
       strInstallDate = Null  ‘ init value
       If objItem.ServicePackInEffect <> “” Then
          strRegKey = strRegBaseUpdate & “\” & objItem.ServicePackInEffect _
                 & “\” & objItem.HotFixID
          objReg.GetStringValue HKLM, strRegKey, _
               “InstalledDate”, strInstallDate
       End If

       If IsNull(strInstallDate) Then
          strInstallDate = “(none found)”
       End If
       Wscript.Echo “InstallDate: ” & strInstallDate
       Wscript.Echo   ‘ blank line
    End If



I found this script in the community. Worth a try!


strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
    & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
Set colQuickFixes = objWMIService.ExecQuery _
    (“Select * from Win32_QuickFixEngineering”)
For Each objQuickFix in colQuickFixes
    Wscript.Echo “Computer: ” & objQuickFix.CSName
    Wscript.Echo “Description: ” & objQuickFix.Description
    Wscript.Echo “Hot Fix ID: ” & objQuickFix.HotFixID
    Wscript.Echo “Installation Date: ” & objQuickFix.InstallDate
    Wscript.Echo “Installed By: ” & objQuickFix.InstalledBy



Very recently, I found this GUI utility by name WinUpdatesList.

  • WinUpdatesList displays the list of all Windows updates (Service Packs and Hotfixes) installed on your local computer.
  • For hotfix updates, this utility also displays the list of files updated with these hotfixes.
  • In addition, it allows you to instantly open the Web link in Microsoft Web site that provides more information about the selected update, uninstall an update, copy the update information to the clipboard, or save it to text/HTML/XML file. 


You can also query list of updates /hotfixes installed by this simple command (one line). Replace ‘server-name’ with your server or your machine name;

wmic /node:’server-name‘ qfe GET description,FixComments,hotfixid,installedby,installedon,servicepackineffect

You can also output the result to a text / csv file;

wmic /node:’server-name‘ qfe GET description,FixComments,hotfixid,installedby,installedon,servicepackineffect > QFElist.txt


Qfecheck.exe Verifies the Installation of Windows 2000 / 2003 and Windows XP Hotfixes

Alternatively, take a look at the Microsoft Baseline Security Analyzer (MBSA)

WinUpdatesList v1.12

List Installed Service Packs and Hot Fixes

Create a Task to Display Service Packs & Hotfixes in MOM Operator Console

Content File Download Failed: Access Denied


You may see the following error and the download of packages you have set to install may fail, with the following error written to the Application log:

Event Type: Error
Event Source: Windows Server Update Services
Event Category: Synchronization
Event ID: 364
Content file download failed. Reason: Access is denied
Source File:
Destination File:


This is due to lack of permissions for ‘NT AUTHORITY\NetworkService’ account. Check the file permissions on the root and the folder where update content is downloaded. With the WSUS RC1 release, NETWORK SERVICE needs Read access to the root of the drive, and also needs Modify to the \WsusContent directory. On Windows 2000 you can workaround by granting READ access to Everyone to the root of the drive.

WSUS: The specified string is invalid. Parameter name: FullDomainName


You see the following error while you see the computer reports within Windows Server Update Services (WSUS) – like computers, status of update, reports with computers:

Windows Server Update Services encountered an error. The specified string is invalid. Parameter name: FullDomainName


Windows Server Update Services encountered an error.
The specified string is invalid. Parameter name:

Microsoft.UpdateServices.Administration.WsusInvalidDataException: The
specified string is invalid.
Parameter name: FullDomainName —> System.ArgumentException: The specified
string is invalid.
Parameter name: FullDomainName
Microsoft.UpdateServices.Internal.StringValidation.ValidateDomainNameString­(String paramName, String value)
   at Administration.Computers.List.Page_Load(Object sender, EventArgs e)


This is due to the apostrophe in the Computer Name of the workstation which cannot be validated.


This is a known issue. To avoid this behavior, you might want to re-name the Computer Name of the Workstation and exclude the apostrophe.

Repeated WSUSAdmin Login Prompts

Sometimes or very often you notice that you are prompted for login credentials aka Username & Password when you browse http://Your-WSUS-Server/WSUSAdmin. You might wonder why it repeatedly prompts for the login.

This is by design & to remedy this, you might want to add http://Your-WSUS-Server/WSUSAdmin to “Local Intranet” Zone from Internet Explorer – Tools – Options – Security – Local Intranet – Sites – Advanced – Add this website to the Local Intranet Zone.