Windows Server Blog
This is page 5 of the discussion. Read the opening post
After Hours
This is page 5 of the discussion. Read the opening post
Unable to generate a temporary class: You see the following error while trying to synchronize WSUS Server with MU & synchronization fails at 99%.
Complete error message is as follows :>>>>>>>>>
System.InvalidOperationException: Unable to generate a temporary class (result=1).error CS2001: Source file 'C:\WINDOWS\TEMP\m9yekbox.0.cs' could not be founderror CS2008: No inputs specified
at Microsoft.UpdateServices.Internal.ClassFactory.CallStaticMethod(Type type, String methodName, Object[] args)
at Microsoft.UpdateServices.Internal.BaseApi.Subscription.GetSynchronizationHistory(DateTime fromDate, DateTime toDate)
at Microsoft.UpdateServices.Internal.BaseApi.Subscription.GetLastSynchronizationInfo()
at Administration.Manage.Subscriptions.SubscriptionProxy.GetSynchronizationStatus()
at Administration.Reporting.CurrentStatus.CurrentStatusProxy.GetHomeStatusClientFunction(String xPostXml)
at Administration.Reporting.ReportingXPost.Page_Load(Object sender, EventArgs e)
at Microsoft.UpdateServices.Internal.ClassFactory.CallStaticMethod(Type type, String methodName, Object[] args)
at Microsoft.UpdateServices.Internal.BaseApi.Subscription.GetSynchronizationHistory(DateTime fromDate, DateTime toDate)
at Microsoft.UpdateServices.Internal.BaseApi.Subscription.GetLastSynchronizationInfo()
at Administration.Manage.Subscriptions.SubscriptionProxy.GetSynchronizationStatus()
at Administration.Reporting.CurrentStatus.CurrentStatusProxy.GetHomeStatusClientFunction(String xPostXml)
at Administration.Reporting.ReportingXPost.Page_Load(Object sender, EventArgs e)
This is due to lack of permission for NTAUTHORITY\NETWORK SERVICE account on the TEMP folder. To resolve this issue, assign NETWORK SERVICE the following permissions on C:\Windows\Temp;
List Folder / Read Data
Delete
One of the important issue with Windows Server Updates Service (WSUS) Administration is troubleshooting WSUS Server for downloads. You may encounter situations where WSUS Synchronization fails.
We will take a look at the proxy settings.
Most of the times, the culprit is the proxy server where in you have authentication defined on outgoing web proxy requests. This means Anonymous access for proxy is disabled. If you are using ISA Server as your proxy server, then you must create an anonymous access rule for the following windows update websites.
|
• |
|
|
• |
|
|
• |
|
|
• |
The procedure is explained on http://support.microsoft.com/default.aspx?scid=kb;en-us;885819.
And now, you have to configure WSUS to Use user credentials to connect to the proxy server. With this option enabled, you have to enter the username, password & domain of the user account which is having internet access via proxy server. You can also Allow basic authentication but then, remember, password is sent in clear text which is a security threat...We are using WSUS to patch the security threats!!
Procedure:
i). On your WSUS server, click Start, point to All Programs, point to Administrative Tools, and then click Microsoft Windows Server Update Services.
ii). On the WSUS console toolbar, click Options, and then click Synchronization Options.
iii). In the Proxy server box, click Use a proxy server when synchronizing, and then enter the server name, and port number of the proxy server in the corresponding boxes.
iv). If you want to connect to the proxy server under specific user credentials, click Use user credentials to connect to the proxy server, and then enter the user name, domain, and password of the user in the corresponding boxes.
v). Under Tasks, click save settings, and then click OK when the confirmation box appears.
vi). Synchronize now.
Today, I have added another known WSUS issue on Known WSUS Issues at the Wiki.
For more information and troubleshooting tips, keep an eye on http://www.wsuswiki.com/ and the Patch Management Blog :-)
Continued from http://msmvps.com/athif/archive/2005/08/17/63110.aspx
Q. Does Windows Server Update Services (WSUS) support patches for Exchange 2000?
A. YES, WSUS Supports patches for Windows 2000+, Exchange 2000+, SQL Server 2000+, and Office XP+ with expanding support. More information on http://www.microsoft.com/windowsserversystem/updateservices/evaluation/compare.mspx
Quoting from WSUS Overview document, "Initially, Microsoft Update, to which at least one WSUS server must connect to get available updates and update information, will make available updates for Microsoft Windows, Office, SQL Server, and Exchange. Additional Microsoft product updates will become available on Microsoft Update in the future."
More information on WSUS Guides.
Q. If you have a group setup in WSUS as detect-only and you change the options to install, do the updates that are set as detect-only ever get installed after the change or do those updates need to be changed manually?
A. YES, they do get installed after the change. But, this is only after Automatic Update Client (AU) completes the next detection cycle which can be configured for AU Client at the following location in the registry, HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU, DetectionFrequency (Reg_DWORD) = Time between detection cycles. DetectionFrequency (use default value of 22 hours).
For Quick AU Client Detection & Installation with Windows Server Updates Services, WSUS, see http://msmvps.com/athif/archive/2005/06/29/56200.aspx
Continued from http://msmvps.com/athif/archive/2005/08/17/63110.aspx
Q. Does Windows Server Update Services (WSUS) support patches for Exchange 2000?
?
A. YES, WSUS Supports patches for Windows 2000+, Exchange 2000+, SQL Server 2000+, and Office XP+ with expanding support. More information on http://www.microsoft.com/windowsserversystem/updateservices/evaluation/compare.mspx
?
Quoting from WSUS Overview document, "Initially, Microsoft Update, to which at least one WSUS server must connect to get available updates and update information,? will make available updates for Microsoft Windows, Office, SQL Server, and Exchange. Additional Microsoft product updates will become available on Microsoft Update in the future."
?
More information on WSUS Guides.
?
Q. If you have a group setup in WSUS as detect-only and you change the options to install, do the updates that are set as detect-only ever get installed after the change or do those updates need to be changed manually?
?
A. YES, they do get installed after the change. But, this is only after Automatic Update Client (AU) completes the next detection cycle which can be configured for AU Client at the following location in the registry, HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU, DetectionFrequency (Reg_DWORD) = Time between detection cycles. DetectionFrequency (use default value of 22 hours).
?
For Quick AU Client Detection & Installation with Windows Server Updates Services, WSUS, see http://msmvps.com/athif/archive/2005/06/29/56200.aspx
?
While Exporting WSUS to a disconnected network server, the following error is logged in the the import log file;
"<ImportError Message="The metadata format is incorrect" /></ImportLog>"
The import was not succesfull and eventually, export fails.
Trivia:
WSUS Admin wants to modify the metadata so that the downsteram WSUS Admin should not be able to see the Un-Approved Updates and so he plays with Package.xml file.
Looks like he is modifying the meta data. This is logged from Package.XML"
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Christophe Michel (Thales Security Systems) --> "
And, obivously the import - export fails.
That was right. The user (WSUS Admin) says, "it will work if i don't touch both files. The reason why i modified the two files is that i want to import only appoved metadata in order to downstreamed administrator can't check metadata not approved bu the first online WSUS server."
Moraly of the story: Do not play with the XML file to modify the meta data. That is not supported.
Previous FAQ's;
http://msmvps.com/athif/archive/2005/08/17/63110.aspx
http://msmvps.com/athif/archive/2005/08/30/64594.aspx
Yes, I am talking about Support Tools for Windows Server Update Services (WSUS). As of now, there are;
Server Diagnostic Tool for troubleshooting Update Services Server.
Client Diagnostic Tool for troubleshooting Client Machines.
Keep an eye on Windows Server Update Services Downloads Page for all the tools related to WSUS.
You asked for Windows Server Update Services (WSUS) help and we need some basic information to assist your further;
Run this query from command prompt!
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
Run this query from command prompt!
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /s
Post your results.
Also, Post a copy of C:\Windows\WindowsUpdate.log. Typically, you might want to clear the WindowsUpdate.log file and then run this command "wuauclt /detectnow" which will regenerate the log file giving the latest information.
NOTE: In Windows XP REG.exe is a part of the operating system's native commands. In NT and W2K you'll need the Resource Kit to add this tool. You can download REG.EXE from here: http://www.dynawell.com/reskit/microsoft/win2000/reg.zip
OK, you have changed Windows Server Update Services (WSUS) NETBIOS Name / Computer Name and now when you try to launch the short-cut from Administrative Tools, you notice that it still references to the old shortcut and that's true. So, you need to edit this shortcut path to reflect the new NETBIOS Name / Computer Name.
You try to change the target from property and it is grayed out meaning you cannot edit it.
So, here is a workaround. Follow these steps;
1. Right Click in empty area on desktop – Click Properties – Click New Shortcut
2. In Type the Location of the item, type "http://Your-WSUS-Server-Name/WSUSAdmin" (Remove Quotes)
3. Click Next – In Type a name for this shortcut, type "Microsoft Windows Update Services" (Remove Quotes)
4. Click Finish – Now, right click the new shortcut created – Click Properties – Click Web Document – Click Change Icon – In look of Icons in this File, type "%SystemRoot%\Installer\{A0D46DC6-8950-451A-8990-53C86E17666E}\wu.ico" (Check for word wrap and remove quotes)
5. Now, you need to replace the newly created shortcut in the following location; C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools
6. You are done. Double click this short cut from Administrative Tools to launch the WSUSAdmin Console. Let me know if this works for you:-)
Sometimes, you notice, Automatic Update Client (AU) are not reporting in Windows Server Update Services (WSUS) Server
WindowsUpdate.log shows the following errors;
DtaStor FATAL: Failed to initialize datastore, error -0xC8000212
AUClnt FATAL: Error: 0xc8000212, wuauclt datastore: failed to spawn COM server
DTAStor FATAL: DS: Out of proc datastore process exited with error 0xc8000212 before signaling ready event.
Error 0xC8000212 translates to 'hrBadLogSignature' which strikes to me as some problem with the log files.
Typically, this can be resolved by stopping the Automatic Updates service, delete the contents of the DataStore (%windir%\SoftwareDistribution) folder, and restart the Automatic Updates service.
In continuation to my post on Windows Server Update Services (WSUS) Support Tools, Windows Server Update Services (WSUS) Reporting Rollup Tool Sample is available for testing.
Windows Server Update Services (WSUS) Reporting Rollup Tool Sample
ReadMe for Windows Server Update Services (WSUS) Reporting Rollup Tool Sample
The Reporting Rollup Sample Tool package contains both a pre-built reporting rollup tool and sample source files which you can use to build unique reporting rollup tools.
This sample tool was created using the Windows Server Update Services (WSUS) application programming interface (API) in order to demonstrate centralized monitoring and reporting for Windows Server Update Services (WSUS). This tool rolls up update and computer status from all of the Windows Server Update Services (WSUS) servers in your Windows Server Update Services (WSUS) implementation in a single report.
One of the frequent questions in Windows Server Update Services (WSUS) News Groups is XP clients does not appear in the Windows Server Update Services (WSUS) console. This is TRUE, if the XP Client was setup using an Image (ghost). See this KB article for a resolution;
Automatic Updates with Windows Server Update Services (WSUS) doesn’t work if workstation is installed via Disk Imaging / Disk Cloning
Q. How can I check whether my installation was a fresh installation or was created via a Sysprep image?
A. To determine whether an installation was created via a Sysprep disk image, perform these steps (on Windows NT 4.0 or later):
1. Start the registry editor (regedit.exe).
2. Go to the HKEY_LOCAL_MACHINE\SYSTEM\Setup registry subkey.
3. If the CloneTag subkey exists, your machine was created from a Sysprep image. The value of the CloneTag subkey is the date and time that the image was created.
4. You'll also see a CmdLine subkey, which is the command that runs on the machine's first start-up (e.g., "setup.exe -newsetup -mini," which tells the setup to perform a mini, GUI-based setup).
Credit: Lockergnome
Not all updates are synchronized., Several notable updates are missing.
http://www.wsus.info/forums/index.php?showtopic=6105 This deserves an entry on the WSUS Wiki.
If this is an issue you encountered, please drop a comment!
More information on http://www.wsuswiki.com/Allupdatesarenotsynchronized
You see the following error while trying to Import Windows Server Update Services (WSUS) Content & Meta data using WSUSUTIL.exe
"Updates are being imported. Please do not stop this program. Import failed to import updates. Please tlook at the log file for error details.
Fatal Error: Access to the path "C\Docum 1\KLIFT 1.SNY\LOCALS 1\Temp\1\tmp16.tmp is denied."
Solution:
You have to manually add the Network Service group to the access control list for the folder where updates are stored & on the TEMP Folder. Give the Network Service group Full Control.
So, How do you configure Automatic Update Client for Windows Server Update Services (WSUS) in a workgroup environment. Check a sample registry script on ;
Windows Server Update Services (WSUS): Script to Manually Configure Automatic Update Client for Windows Server Update Services (WSUS) in a workgroup environment;
http://support.microsoft.com/kb/555454
With reference to my previous blog entry explaining different ways to force an update detection, check this script which can do this auotmatically for you;
Windows Server Update Services (WSUS): Script to Force the Update Detection from Automatic Update Client for updates on Windows Server Update Services (WSUS) Server;
http://support.microsoft.com/kb/555453
When the updates are installed, the logged in user is prompted to "Restart Now" or "Restart Later." But, some times, you may notice, the "Restart Later" button is grayed out and the prompt won't go away unless the logged in users clicks the "Restart Now" button.
The Fact:
Users with Administrative rights get the "Restart Later" option. For Normal users, "Restart Later" button is grayed out. They either have to restart then, or ignore the dialog until they can restart.
Previously, with Software Update Services, the logged in user was popped with a countdown timer of 5 minutes to restart the machine.
The logic:
This is very well explained in KB;
Automatic Update Client Behavior for Users with Local Administrative Privilege & vice-versa
http://support.microsoft.com/kb/555350
The solution:
If you want to give non-local admin the privilege to "Restart Later" option, you have to enable "Allow non-administrators to receive update notifications" setting from Group Policy or Registry for that matter.
This policy specifies whether logged-on non-administrative users will receive update notifications based on the configuration settings for Automatic Updates. If Automatic Updates is configured, by policy or locally, to notify the user either before downloading or only before installation, these notifications will be offered to any non-administrator who logs onto the computer.
The Procedure:
Allow Non-administrators to Receive Update Notifications from Group Policy:
1. In Group Policy Object Editor, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Update.
2. In the details pane, click Allow non-administrators to receive update notifications, and set the option.
3. Click OK.
ElevateNonAdmins: Allow Non-administrators to Receive Update Notifications from registry:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
1 = Enabled.
0 = Disabled.
With ElevateNonAdmins set to 1;
You are allowed to select "Restart Later" even as an ordinary user
You are allowed to use the AU icon in the system tray to start installations before scheduled installation time
As well as unselect updates that is scheduled to be installed on the computer.
Windows 2000 Service Pack 4 does not show up in WSUSAdmin to approve for installation. Why??
Actually, it is still there but, the default filter view on update page, will only display Critical and Security Updates in the filtered view where as Windows 2000 Service Pack 4 is classified as "Update Rollups".
Also, you have to included "Update Rollups" in Synchronization Options - Add / Remove Classifications and select Update Rollups and perform sync with MU. Search again on Updates page
Now, on Updates Page, Select the criteria you want to use to filter the view, select 'All updates' under "Products and classifications", 'All updates' under "Approval", and set the "Synchronized" filter to 'Any time'. In the "Contains text" field, type "Windows 2000 service pack 4".
You should now see "Windows 2000 Service Pack 4 Network Install for IT Professionals" and it is classified as "Update Rollups". Go ahead and approve it :-)
With Software Update Services, Automatic Update Client stores patches in 'C:\WUTEMP' (disk with large space) or 'C:\ProgramFiles\WindowsUpdate\wuaudnld.tmp' while waiting to install the patches.
With Windows Server Update Services (WSUS), Automatic Update Client stores patches in 'C:\Windows\SoftwareDistribution\Download' while waiting to install the patches.
Sometimes, after you approved some patches you will notice many of the PC's are reporting status as UNKNOWN.
This is a known issue if you just approve an update and then check the reports. After approving update, if the clients did not perform a detection cycle, you see a status of UNKNOWN. Yes, TIME is the factor here.
You can force update detection from the client and you will see the status no more remains Unknown.
More information on;
Quick Automatic Update Client Detection & Installation with Windows Server Updates Services, Windows Server Update Services (WSUS):
http://msmvps.com/athif/archive/2005/06/29/56200.aspx
Windows Server Update Services (WSUS): Script to Force the Update Detection from Automatic Update Client for updates on Windows Server Update Services (WSUS) Server:
http://support.microsoft.com/kb/555453
How do I change the WSUS Server to the Replica Mode??
This is asked very frequently in WSUS Community. At this moment it is not possible to change the WSUS Server to Replica Mode. Whilst installation, there is an option to select WSUS for replica and that's it. There is no UI or an option to configure the same after installation. If you really need this feature add it to WSUS WSUS Wiki Wish List on http://www.wsuswiki.com/WishList
Most of you might have noticed, AUstate values aren't available anymore in WSUS. AUstate was very helpful for WOL Admins.
If you are in WOL network, then you might want to check this script which can update the AUState automatically (which you can run at shutdown) so the existing WOL process will still work:
More Information
http://www.wsus.info/forums/index.php?showtopic=6205
http://www.wsus.info/forums/index.php?showtopic=6205&view=findpost&p=25211
With Software Update Services, Automatic Update Client stores patches in 'C:\WUTEMP' (disk with large space)?or 'C:\ProgramFiles\WindowsUpdate\wuaudnld.tmp' while waiting to install the patches.
With Windows Server Update Services (WSUS), Automatic Update Client stores patches in 'C:\Windows\SoftwareDistribution\Download' while waiting to install the patches.
How often Security Updates are released?
This is often asked in the WSUS Community (WSUS News Groups / Forums) and it deserves a blog entry.
Microsoft releases Critical Security Updates once in a month in second week, TUESDAY. So, Second Tuesday of every month is THE PATCH DAY. Unless otherwise, if it is critical, Microsoft can release the patch in mid of the patching schedule.
Is it possible to revoke Updates once they are downloaded by the Automatic Update Client?
Actually, it’s not possible to revoke updates once they are downloaded by the Automatic Update Client.
But, you can actually delete those from the temporary location where they reside while waiting to install the patches!!
This is explained in my previous blog entry on;
Where does an Automatic Update Client store patches while waiting to install the patches??
http://msmvps.com/athif/archive/2005/09/06/65553.aspx
WSUS does not download the updates during the synchronization with MU.
On WSUSAdmin Page, in the area of download you see the following:
Synchronization Status
Last synchronization: 9/10/2005 6:56 PM
Last synchronization result: Success
Next synchronization: 9/10/2005 8:23 PM
Current status: Idle
Synchronize now Stop synchronizing
Status of Downloads
Updates needing files: 404
Downloading 0.00 MB of 1,130.95 MB
This is explained in WSUS-Articles section;
Windows Server Update Services does not download the updates during Synchronization with MicrosoftUpdate, MU;
http://msmvps.com/athif/articles/66365.aspx
Error 0x80070643 is logged while installing MSDE during WSUS Setup. Fatal error during installation. Microsoft Windows Server Update Services could not install Microsoft SQL Server 2000 Desktop Engine.
See Error 0x80070643: Windows Server Update Services could not install MSDE 2000 Desktop Engine
http://msmvps.com/athif/articles/66059.aspx
Does Windows Server Update Services (WSUS) handles WGA?
The answer is NO. The validation tool (WGA) is not yet distributed through WSUS it is only available from the MU site.
This post applies to September 2005 Synchronization;
On WSUSAdmin page, in the To Do List, You might see "1 new product and 0 new classifications were added in the last 30 days."
What is the new product & how to find that?
Normally, you can see if a new product or classification is added by looking under options, synchronization options, products & classifications in the UI. But, in this case, the UI does not show-up. This is strange!
According to Windows Server Update Services (WSUS) Team, “This is because a revision to the Office product family was published on or around 9/1. I’m not sure why it was revised, or what the revision was and it is certainly a bug that revisions to Products/Categories would trigger the “new products” notification on the WSUS home page.”
Windows Server Update Services Updates are needed to ensure computers can be updated correctly. If Windows Server Update Services (WSUS) updates are not approved, some updates may not be correctly detected by computers. Currently, this includes Windows Installer 3.1 and Background Intelligent Transfer 2.0 (MSI 3.1 & BITS 2.0)
So, this means Windows Server Update Services Updates are needed to ensure computers can be updated correctly. These updates (MSI 3.1 & BITS 2.0) are mandatory critical updates and they will be automatically downloaded by Automatic Update Client.
MORE INFORMATION
WSUS Mandatory Updates:
http://msmvps.com/athif/articles/66501.aspx
There are several places to find this file;
SYMPTOMS
You notice, the Office Updates as approved on Windows Server Update Services (WSUS) Server when installed by Automatic Update Client forces the logged in user to accept the EULA, End User License Agreement every time they open an Office application
This behavior occurs if your user account does not have permissions to modify the Microsoft Windows Registry.
RESOLUTION
http://support.microsoft.com/default.aspx?scid=kb;en-us;884202&FR=1
Right-click the HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0 subkey or the HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0, and then click Permissions.
Click Users (Computer_name\Users), and then click to select the Allow check box for the Full Control permission
SYMPTOMS
You see the following error on WSUSAdmin Page;
Check your server configuration
=====================
One or more Update Service components could not be contacted. Check your server status and ensure that the Windows Server Update Service is running.
Non-running services: SelfUpdate
And, the following event is logged;
Event Type: Error
Event Source: Windows Server Update Services
Event Category: Update Services Service
Event ID: 506
User: N/A
Description:
The SelfUpdate Tree is not working. Clients may not be able to update to the latest WUA client software and communicate with the Windows Server Update Services (WSUS) Server.
RESOLUTION
Check Windows Server Update Services (WSUS): SelfUpdate Tree is not working on http://msmvps.com/athif/articles/67954.aspx
SCENARIO
What if you accidentally deleted Windows Server Update Services (WSUS) Computer Group from WSUSAdmin Console??
RESOLUTION
Don’t panic, this is at least not the DR situation!!
When you have CST (Client Side Targeting) enabled, this is very easy. All you have to do is to recreate the COMPUTER GROUP inside of WSUS with the same name.
Be patient, till the Automatic Update Client completes the next detection cycle & once the AD machine policies is refreshed on the computers, they will re-populate into the group :-)
Hmm.. I just noticed today and I have almost 3000 posts on http://wsus.info forums :-)
I just hit the 3000 mark on http://wsus.info forums, http://www.wsus.info/forums/index.php?showtopic=6547&st=0&gopid=26361&#entry26361
You might have noticed Windows Server Update Services (WSUS) SQL Service Manager shows Not Connected and you might be wondering why it shows as Not Connected??!!
This is because you are running WMSDE on WSUS & SQL Service Manager cannot see it & it is not manageable with SQL Service Manager.
Sometimes, you might want to purge the downloaded patches as downloaded by Automatic Update Client but hey, there is not UI (User Interface) to accomplish the same. So what is the deal?
How can you purge the downloaded patches if you don’t need them any more or If you have already declined those patches?
This can be accomplished using "PurgeUnneededFiles" function in the Windows Server Update Services (WSUS) Server Diagnostic Tool that can be used to purge the downloaded patches once an update is marked as Declined.
After the installation of updates by the Automatic Update Client, sometimes, windows globe appears in the task bar stating that the computer has been updated and it actually disappears if you double click on it.
When do you see such globe appearing & why?
If an update which was installed & which do not require a restart then, you will see windows globe to appear in the task bar with a notification that those updates have been successfully installed. This is just information and it disappears when you click on that notification.
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.
For those who are reading this blog, I have added some new Windows Server Update Services (WSUS) Articles @ http://msmvps.com/athif/category/1337.aspx?Show=All
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 and here are few of them;
Script that reports installed updates that are installed with Windows Update v5 technology
http://groups.google.com/groups?hl=en&lr=&frame=right&th=36783f6bdf97b407&seekm=egqWZDYvEHA.3320%40TK2MSFTNGP14.phx.gbl#link2
Enumerate hotfixes installed on a computer.
http://groups.google.com/groups?selm=OL6YHXftEHA.2864%40TK2MSFTNGP09.phx.gbl
Kudos to Scripting guru Torgeir Bakken (MVP).
Very recently, I saw this nifty utility by name WinUpdatesList.
MORE INFORMATION
http://www.nirsoft.net/utils/wul.html
Download WinUpdatesList in zip file
Download self-install executable of WinUpdatesList
Scripting guru Torgeir Bakken's response;
| Torgeir Bakken (MVP) |
It is easy to create this command line utility yourself. Windows Server Update Services (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
"StartSynchronization.vb"
2) Open a command prompt, and navigate to the directory containing
StartSynchronization.vb.
3) Run the following command line (all one one line, you will need to
unwrap the line before running it!):
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\vbc.exe
StartSynchronization.vb /r:"%PROGRAMFILES%\Update Services\
service\bin\Microsoft.UpdateServices.Administration.dll"
/out:StartSynchronization.exe
This will create a tool called StartSynchronization.exe that when run
will start a WSUS synchronization.
Content of StartSynchronization.vb:
--------------------8<----------------------
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()
subscription.StartSynchronization()
End Sub
End Module
--------------------8<----------------------
More WSUS API information/examples:
"Windows Server Update Services API Samples and Tools" is available for
download here:
http://www.microsoft.com/windowsserversystem/updateservices/downloads...
and
Platform SDK: Windows Server Update Services
http://msdn.microsoft.com/library/en-us/wus/wus/portal.asp
--
Source:
microsoft.public.windows.server.update_services
ERROR
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
DESCRIPTION
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.
at
Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteReader()
at
Microsoft.UpdateServices.Internal.SingleResultSetSPHandler.ExecuteStoredProcedure(DBConnection connection)
at Microsoft.UpdateServices.Internal.GenericDataAccess.ExecuteSP(String
spName, DBParameterCollection args, IExecuteSPHandler handler)
at
Microsoft.UpdateServices.Internal.DataAccess.ExecuteSPSingleResultSet(String
spName, DBParameterCollection args, Type resultType)
at
Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccess.ExecuteSPDeployUpdate(Guid
updateId, Int32 revisionNumber, Int32 deploymentAction, Guid targetGroupId,
String adminName, DateTime deadline, Boolean isAssigned, DateTime goLiveTime,
Int32 downloadPriority, Guid deploymentGuid, Boolean translateSqlException)
at
Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccess.ExecuteSPDeployUpdate(UpdateRevisionId
updateId, Int32 deploymentAction, Guid targetGroupId, DateTime deadline,
String adminName)
at
Microsoft.UpdateServices.Internal.BaseApi.Update.Approve(UpdateApprovalAction
action, IComputerTargetGroup targetGroup, DateTime deadline)
at
Microsoft.UpdateServices.Internal.BaseApi.Update.Approve(UpdateApprovalAction
action, IComputerTargetGroup targetGroup)
at Administration.Updates.UpdateProxy.Deploy(String xpostXml)
at Administration.Updates.UpdateXPost.Page_Load(Object sender, EventArgs e)
at
Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteReader()
at
Microsoft.UpdateServices.Internal.SingleResultSetSPHandler.ExecuteStoredProcedure(DBConnection connection)
at Microsoft.UpdateServices.Internal.GenericDataAccess.ExecuteSP(String
spName, DBParameterCollection args, IExecuteSPHandler handler)
at
Microsoft.UpdateServices.Internal.DataAccess.ExecuteSPSingleResultSet(String
spName, DBParameterCollection args, Type resultType)
at
Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccess.ExecuteSPDeployUpdate(Guid
updateId, Int32 revisionNumber, Int32 deploymentAction, Guid targetGroupId,
String adminName, DateTime deadline, Boolean isAssigned, DateTime goLiveTime,
Int32 downloadPriority, Guid deploymentGuid, Boolean translateSqlException)
at
Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccess.ExecuteSPDeployUpdate(UpdateRevisionId
updateId, Int32 deploymentAction, Guid targetGroupId, DateTime deadline,
String adminName)
at
Microsoft.UpdateServices.Internal.BaseApi.Update.Approve(UpdateApprovalAction
action, IComputerTargetGroup targetGroup, DateTime deadline)
at
Microsoft.UpdateServices.Internal.BaseApi.Update.Approve(UpdateApprovalAction
action, IComputerTargetGroup targetGroup)
at Administration.Updates.UpdateProxy.Deploy(String xpostXml)
at Administration.Updates.UpdateXPost.Page_Load(Object sender, EventArgs
e)"
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 (WSUS) server
2) As administrator, run the following command.
osql -E -S -n -b -i addDeploymentIndex.sql
The osql utility can be found in under the Program Files\Update Services\Tools folder.
Content of addDeploymentIndex.sql:
--------------------8<----------------------
USE SUSDB
GO
BEGIN TRAN
IF NOT EXISTS (SELECT * FROM sysindexes where name='nc7DeploymentRevision')
BEGIN
CREATE NONCLUSTERED INDEX nc7DeploymentRevision ON dbo.tbDeployment(RevisionID, TargetGroupID, ActionID)
END
COMMIT TRAN
GO
--------------------8<----------------------
Note that the text starting with "CREATE NONCLUSTERED " between the
BEGIN
...
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.
SOURCE
Microsoft.public.windows.server.update_services
Whilst troubleshooting Automatic Update Client for Critical Security Updates, the best troubleshooting starts from WindowsUpdate.log file (%systemroot%\WindowsUpdate.log). Here is how you read the WindowsUpdate.log file
How to read the WindowsUpdate.log file;
http://support.microsoft.com/default.aspx?scid=kb;en-us;902093
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.
As promised earlier at the time of Windows Server Update Services (WSUS) release, more & more products will be added to WSUS and very recently 2 new Products are added for WSUS Synchronization in Add/Remove Products list;
Way to go!
In my blog entry earlier, I talked about Synchronizing WSUS-Replica (slave) Server from the Command Line and now I came across WSUS Remote Sync on WSUSWiki
WSUS Remote Sync is a tool which allows administrators to synchronize remote WSUS servers from the master console created by Allen Holman/mincus. Kudos Allen!
MORE INFORMATION
http://wsus.editme.com/WSUSRemoteSync
Oh cool :-). A welcome notification from WSUS Product Team Blog for New SBS recommended updates to be published for Small Business Server via WSUS.
In my previous blog entry we saw TWO New Products added for WSUS Synchronization in Add/Remove Products list & now you have to select this new SBS category for the new updates :-)
SBS folks must be happy :-). BTW, Susan where are you hiding?
This blog entry is follow-up & small correction to my previous blog enry on TWO New Products added for WSUS Synchronization in Add/Remove Products list. According to WSUS Product Team Blog entry, about the product Microsoft Codename Max which is a new consumer beta offering from Microsoft. While this product category will be added to the WSUS synch options product dialog, there will be no "Codename Max" software or updates synched from Microsoft Update to WSUS servers. Codename Max is not applicable to the WSUS infrastructure. The actual appearance of the product category in the WSUS UI is a glitch in our publishing logic which will be addressed in SP1.
Mark, thanks for the comment (who ever you are) :-)
Just noticed the November December issue of TechNet Magazine and articles on Patch Management;
Patch Management
Next Generation Patch Management: Introducing Windows Server Update Services
Keeping system software up to date is critical. Windows Server Update Services (WSUS) simplifies the process, offering an efficient way for IT administrators to manage and deploy updates.
Jason Leznek
A Hands-On Guide to Hands-Off Updates with WSUS
Learn everything you need to know to install, configure, and start using WSUS to manage updates throughout your organization.
Jeremy Moskowitz
Maximize the Power of SMS with New Tools for Managing Updates
SMS 2003 offers a powerful way to scan clients, configure phased updates, and perform custom deployments. Here’s how to use it.
Bob Lawler
Hello everyone and after a long time, I am back to the community. I have changed my employer and I am now working for Atos Origin Middle East.
So, today I started to play with MOM2005 in my test-bed and encountered with couple of issues which I really wanted to share;
ENVIRONMENT
Ok, fair enough and I installed SQL 2000 SP4 without any glitches. One thing to remember here is the SQLSERVERAGENT SERVICE will not start automatically and you have to start it manually.
Now, I ran the Check Prerequisites wizard (The Prerequisite Check page indicates whether you have met all the requirements for installing the MOM components) to check the following Selected Components:
The prerequisite check failed for the selected components. The reason being MOM setup is unable to detect SQL Server 2000 SP4;
Failures
Minimum Requirement
Recommended
(if different from minimum)
Required For
Detected Value
Microsoft SQL Server 2000 SP3 or later. SQL Server 2000 SP3 or later not detected
Download the required version from http://www.microsoft.com/downloads/
I quickly ran SQL Query Analayser to check if the SP4 is installed to execute the following queries;
As expected the result is SP4 8.00.2039 [Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)]
As always, I am back to community for help and started the following thread MOM prerequisite check failed. Thanks to Ronny for guiding to support kb article You receive a " Microsoft SQL Server 2000 SP3a or above required" error message when you try to install MOM 2005. I then found Technet Troubleshoot MOM 2005 Prerequisite Checking article which further explained this BUG.
Instead of executing msiexec command with PREREQ_COMPLETED=1, I found another cheeky workaround where in you can tweak the registry to SQL SP3. For more information see the table below;
SQL Server 2000 Version and Level
@@VERSION
Product Level
SQL Server 2000 Original Release
8.00.194
RTM
Database Components SP1
8.00.384
SP1
Database Components SP2
8.00.534
SP2
Database Components SP3, SP3a or MSDE 2000 Release A.
8.00.760
SP3
Database Components SP4
8.00.2039
SP4
All I have to do is to edit the registry from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion ? value name ?CSDVersion = 8.00.2039 to a new value of 8.00.760? which essentially means SQL SP3. Now, just run the MOMPreReqReport to make sure there are no errors and just run the installer again with success!! Dont forget to revert back to CSDVersion = 8.00.2039.
MORE INFORMATION
http://support.microsoft.com/default.aspx?scid=kb;en-us;902803
http://blog.bernt.net/2005/07/russ-kaufmann-mom-2005-and-sql-server.html
http://cs.thefoleyhouse.co.uk/blogs/karl/archive/2005/07/02/456.aspx
Happy Testing!
If you are wondering How to Identify MOM2005 Service Pack Level in MOM2005, then you can use this tip;
Right click Microsoft Operations Manager (Your-MOM-Server) and click About Microsoft Operations Manager and check the first line;
DESCRIPTON
The "Microsoft SQL Server" management pack failed to execute the SQL Server 2000 Replication Monitoring script successfully. The following error event was returned "Access denied while reading registry value [\\Your-MOM-Server\HKLM\Software\Microsoft\MSSQLServer\Setup\ProductCode]". The following additional error details were returned "". Please refer to the events associated with this alert to view the computers that have experienced this problem.
WORKAROUND
In reality, on my SQL2000 SP4 installation, this registry path does not exists. Looks like a BUG.
BEST PRACTICE
Make sure MOM ACTION account is a member of Built-in Users group on MOM Server. Built-in Users group has read permissions on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer.
DESCRIPTION
An error occurred while executing 'AD Remote Topology Discovery' Failed to CreateObject 'OOMADs'. The error returned was: 'ActiveX component can't create object' (0x1AD) 0x1AD.
CAUSE
This occurs when domain controllers do not have the OOMADS.DLL registered which is required for Active Directory Management Pack. As soon as the rules associated with this computer group are deployed, a script automatically runs to install and register this DLL and if you dont have ACTIVE DIRECTORY HELPER OBJECT installed, you will see such error.
WORKAROUND
Install oomads.msi (Active Directory Helper Object) from MOM Support Tools.
DESCRIPTION
The SQL Server management pack script "SQL Server 2000 Block Analysis" is unable to successfully connect to the SQL Server instance "MSSQLSERVER". The error message returned is "Login failed for user."
CAUSE
This might be due to login failure or lack of Windows user rights for the SQL Service Account to Log on as a service (SeServiceLogonRight).
WORKAROUND
Use Lockoutstatus.exe from Windows 2003 Resource Kit Tools which gives a statistics of Bad PWD Count and if the account is locked. If everything is clear, make sure SQL Service Account is having the prvillege to Log on as a service from the Group Policy.
MORE INFORMATION
http://support.microsoft.com/kb/283811/en-us#XSLTH3179121122120121120120
DESCRIPTON
The "Microsoft SQL Server" management pack failed to execute the SQL Server 2000 Replication Monitoring script successfully. The following error event was returned "Access denied while reading registry value [\\Your-MOM-Server\HKLM\Software\Microsoft\MSSQLServer\Setup\ProductCode]". The following additional error details were returned "". Please refer to the events associated with this alert to view the computers that have experienced this problem.
WORKAROUND
In reality, on my SQL2000 SP4 installation, this registry path does not exists. Looks like a BUG. My knowledge to SQL Scripting is very limited and so I have disabled SQL Server 2000 Replication Monitoring Script from MOM Admin Console:-). This script is located in State Monitoring and Service Discovery Event Rules container.
BEST PRACTICE
Make sure MOM ACTION account is a member of Built-in Users group on MOM Server. Built-in Users group has read permissions on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer.
DESCRIPTION
An error occurred while executing 'AD Remote Topology Discovery' Failed to CreateObject 'OOMADs'. The error returned was: 'ActiveX component can't create object' (0x1AD) 0x1AD.
CAUSE
This occurs when domain controllers do not have the OOMADS.DLL registered which is required for Active Directory Management Pack. As soon as the rules associated with this computer group are deployed, a script automatically runs to install and register this DLL and if you dont have ACTIVE DIRECTORY HELPER OBJECT installed, you will see such error.
WORKAROUND
Install oomads.msi (Active Directory Helper Object) from MOM Support Tools.
DESCRIPTION
The SQL Server management pack script "SQL Server 2000 Block Analysis" is unable to successfully connect to the SQL Server instance "MSSQLSERVER". The error message returned is "Login failed for user."
CAUSE
This might be due to login failure or lack of Windows user rights for the SQL Service Account to Log on as a service (SeServiceLogonRight).
WORKAROUND
Use Lockoutstatus.exe from Windows 2003 Resource Kit Tools which gives a statistics of Bad PWD Count and if the account is locked. If everything is clear, make sure SQL Service Account is having the prvillege to Log on as a service from the Group Policy.
MORE INFORMATION
http://support.microsoft.com/kb/283811/en-us#XSLTH3179121122120121120120
DESCRIPTION
The script 'AD Replication Monitoring' encountered a permissions error. The script failed to update this DCs monitoring object in the naming context 'DC=DomainDnsZones,DC=sadad,DC=com' because access was denied. Alter the permissions for this naming context so that the script can add this container, or change the parameters for this script to stop monitoring this naming context.
The error returned was: 'General access denied error' (0x80070005)
CAUSE
This is due to lack of permissions for MOM ACTION account on MOMLatencyMonitors container in Active Directory (this container is hidden).
WORKAROUND
Before installing MOM2005 Agent, make sure Windows Installer 3.1 is installed. I just installed an agent on Windows 2000 server with old version of windows installer and saw this error;
Failed:
The MOM Server detected that remote computer <FQDN>has older version of Windows Installer installed. Please update to Windows Installer 3.1 version.Please refer to release notes for more details.
Error Code: -2147023283
Error Description: This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
DOWNLOAD
DESCRIPTION
While trying to push agent install from MOM2005 Server, you may see the following errors;
SYMPTOMS
The MOM Server failed to install agent on remote computer <FQDN>.
Error Code: -2147023174
Error Description: The RPC server is unavailable.
Microsoft Installer Error Description: No Description Available
The MOM Server failed to perform specified operation on computer <FQDN>.
Error Code: 5
Error Description: Access is denied.
CAUSE
This is seen if MOM ACTION is account is not having the required privileges on the remote computer.
WORKAROUND
DISCLAIMER
This procedure worked for me on member servers.
After enabling access to MOM2005 Operations Console for users, the users are still unable to access / open MOM Operator Console with error;
Access denied to server: <server name>
MOM2005 is installed on Windows Server 2003 SP# 1 and due to changes in DCOM security on Windows 2003 Server SP1, the users connecting to the management Server must now also be in the "Distributed COM Users" local security group on the Management Server.
MORE INFORMATION
You receive a "You do not have the appropriate privilege" error message when you try to open the Microsoft Operations Manager (MOM) 2005 Administrator Console;
http://support.microsoft.com/kb/895952/
The console Scopes defines which computer groups that user of the operator console can view and manage and depending on that you might want to add the users to the following local groups created during MOM2005 installation;
Add the users to specific group and the users will be able to access it accordingly.
If you are wondering to configure DHCP Management Pack to use Low-Privilege (MOM Action) account or normal user account without administrative privileges then that's not supported.
Monitoring functionality on an agent computer is provided by both the MOM Service (MOMService.exe) and the agent Action Account. To work properly, the DHCP Management Pack requires that the Action Account and the MOM Service account both have local Administrator rights on the monitored computer. Configurations with low-privileged accounts are not supported.
MORE INFORMATION
Monitoring in Low-Privilege Configuration with the Windows DHCP Management Pack
http://www.microsoft.com/technet/prodtechnol/mom/mom2005/Library/807086f1-8e1d-4f1f-b040-e07129a6a35b.mspx
SYMPTOMS
You may see a warning alert in MOM Operator Console;
Severity: Warning
Status: New
Source: AD Replication Monitoring
Name: AD Replication is occurring slowly
Description: The following DCs took more than three times the expected replication time to replicate.
DESCRIPTION
The following DCs took more than three times the expected replication time to replicate.
Format: DC, Naming Context, Calculated Replication Time (in minutes). Intersite, expected replication time is 15 minutes.
CAUSE
This is due to IntersiteExpectedMaxLatency of 15 threshold of 15 minutes in AD Replication Monitoring script
WORKAROUND
AD Replication Monitoring script Detects slow replication and replication problems. You can find AD Replication Monitoring VBSscript in the Scripts Container under Management Packs. The parameters can be customized for IntersiteExpectedMaxLatency based on the WAN links for Inter Sites. IntersiteExpectedMaxLatency is the expected maximum time that replication will take to occur between sites and by default it is set to 15 minutes.
DO NOT EDIT THE SCRIPT DIRECTLY and instead click on Parameters - Click on IntersiteExpectedMaxLatency and enter the new value.
Bobbie Harder, WSUS PM has posted some good information with regard to New location to find information about WSUS updates. Thanks Bobbie.
This script by Alexey Biznya will Extract and sort by Categories latest or all updates from \WSUSContent folder. The script will find \WSUSContent folder and SQL Server name from the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Update Services\Server\Setup.
[WSUS stores updates in \WSUSContent folder using SHA1 hash for file names and this script will query WSUS SQL/MSDE database and then exports those updates and categories.]
Requirements
Tunable params
my $root = "C:\\WSUS\\FtpRoot"; Make sure \WSUSContent folder and the folder where it will extract the files should be on the same volume. For instance, I have WSUSContent folder in 'D:\WSUS\WSUSContent and the folder to extract updates in 'D:\WSUS\FtpRoot'
Syntax: WSUSExtract.pl
# ======== start of script ========
#!/usr/bin/perl -w
#
# Name: WSUSExtractor.pl
#
# Purpose: Extract and sort by categories latest or all updates from WSUS .
#
# Syntax: WSUSExtract.pl
#
# Version: 1.0
#
# Requirements: Windows 2000+
# ActivePerl 5.8.7 buld 815 or higher from www.ActiveState.com
# osql.exe Utility (included in MSDE)
# WSUS on MSDE
#
# Author: Alexey Biznya
#
use strict;
use locale;
use IO::File;
use File::Path;
use Win32::Registry;
$|=1;
my $ppid;
my $fpid=open_pid_file("WSUSExtractor.pid");
print $fpid $$;
close($fpid);
# warn("Starting script (pid=$$)\n");
###########################################################################################
# Tunable params
###########################################################################################
my $root = "C:\\WSUS\\FtpRoot"; # your dir for files (volume must be the same at WSUS content folder for NTFS hardlinks)
my $is_latest = 1; # Is all updates extract or latest only
my $update_langs = " 0,1033,1049 "; # comma separated languageIDs of extracting updates (0-all,1033-en,1049-ru,..%lang)
my $descr_lang = "ru"; # short language of titles and descriptions of updates (en,ar ..)
my $db_name = "SUSDB";
my $content_dir = ""; # WSUS content folder
my $server_name = ""; # WSUS SqlServerName
my $tmpfile = "query.sql";
###########################################################################################
my @rec = ();
my $col;
my $query;
my $cmd;
###########################################################################################
# Huge SQL query temporary save to file
###########################################################################################
my $latest_str = "";
if ($is_latest) { $latest_str = " AND tbRevision.IsLatestRevision = 1 ";
print "\nStart extracting latest updates\n"; }
else { print "\nStart extracting all updates\n"; }
open (SQL, ">$tmpfile");
print SQL qq {
SELECT C2.CategoryID, C3.CategoryID, RC4.CategoryID, tbRevisionLanguage.LanguageID,
tbFile.FileName, tbFile.FileDigest
FROM tbCategory AS C1
INNER JOIN tbCategory AS C2 ON C1.CategoryID = C2.ParentCategoryID
INNER JOIN tbCategory AS C3 ON C2.CategoryID = C3.ParentCategoryID
INNER JOIN tbCategory AS C4 ON (C4.ParentCategoryID IS NULL AND C4.CategoryID != 7 )
INNER JOIN tbRevisionInCategory AS RC3 ON ( C3.CategoryID = RC3.CategoryID )
INNER JOIN tbRevisionInCategory AS RC4 ON ( RC4.RevisionID = RC3.RevisionID AND RC4.CategoryID = C4.CategoryID )
INNER JOIN tbBundleDependency ON RC4.RevisionID = tbBundleDependency.BundledRevisionID
INNER JOIN tbPreComputedLocalizedProperty ON ( tbPreComputedLocalizedProperty.RevisionID = tbBundleDependency.RevisionID )
INNER JOIN tbRevision ON ( tbRevision.RevisionID = RC4.RevisionID $latest_str )
INNER JOIN tbFileForRevision ON ( tbFileForRevision.RevisionID = RC4.RevisionID )
INNER JOIN tbRevisionLanguage ON ( tbRevisionLanguage.RevisionID = tbFileForRevision.RevisionID )
INNER JOIN tbFile ON ( tbFile.FileDigest = tbFileForRevision.FileDigest )
WHERE ( tbRevisionLanguage.Expanded = 0 AND tbRevisionLanguage.LanguageID IN ( $update_langs )
AND tbPreComputedLocalizedProperty.ShortLanguage like '$descr_lang' )
ORDER BY tbFile.Modified };
close(SQL);
###########################################################################################
# Find WSUS content folder and SQL server address
###########################################################################################
my $reg;
$::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\Microsoft\\Update Services\\Server\\Setup", $reg)
or die "Can't open registry: $^E";
$reg->QueryValueEx("ContentDir", $col, $content_dir) or die "Cannot find WSUS content folder in registry: $^E";
$content_dir = $content_dir."\\WsusContent";
# print "Here's a dir: $content_dir\n";
$reg->QueryValueEx("SqlServerName", $col, $server_name) or die "Cannot find WSUS content folder in registry: $^E";
$server_name =~ s/%computername%/$ENV{computername}/;
# print "Here's a server name: $server_name\n";
###########################################################################################
# Put to hash Microsoft WSUS languages
###########################################################################################
my %lang = ();
$query= "SELECT LanguageID, ShortLanguage FROM tbLanguage";
$cmd = "osql.exe -w 500 -h-1 -s# -n -E -d $db_name -S $server_name -Q \"$query\" 2>nul |";
open (DAT, $cmd);
while(<DAT>) {
chomp;
# print $_."\n";
if ( @rec = split(/#/) )
{ foreach $col (@rec) { if( $col =~ /^\s*(.+?)\s*$/ ) {$col = $1;} } }
else { last; }
$lang{$rec[0]} = $rec[1];
# print $rec[0]."\t".$rec[1]."\n";
}
close(DAT);
###########################################################################################
# Put to hash Microsoft WSUS categories
###########################################################################################
my %ctg = ();
$query= "SELECT CategoryID, Title FROM tbPrecomputedCategoryLocalizedProperty WHERE ( ShortLanguage like 'en') ";
$cmd = "osql.exe -w 500 -h-1 -s# -n -E -d $db_name -S $server_name -Q \"$query\" 2>nul |";
open (DAT, $cmd);
while(<DAT>) {
chomp;
if ( @rec = split(/#/) )
{ foreach $col (@rec) { if( $col =~ /^\s*(.+?)\s*$/ ) {$col = $1;} } }
else { last; }
$rec[1] =~ s/\s+|\//_/g;
$rec[1] =~ s/\W//g;
$ctg{$rec[0]} = $rec[1];
}
close(DAT);
###########################################################################################
# Processing Microsoft WSUS database and save files
###########################################################################################
my $srcfile;
my $dstfile;
my $path;
my $counter = 0;
$cmd = "osql.exe -w 5000 -h-1 -s# -n -E -d $db_name -S $server_name -i $tmpfile 2>nul |";
print "\nProcessing..\n";
open (DAT, $cmd);
while(<DAT>) {
chomp;
# print $_."\n";
if ( @rec = split(/#/) )
{ foreach $col (@rec) { if( $col =~ /^\s*(.+?)\s*$/ ) {$col = $1;} } }
else { last; }
if ($rec[4] =~ m/.(\w+)$/ ) { $srcfile = $1; }
if ($rec[5] =~ m/^0x(\w{38})(\w{2})$/){ $srcfile = "$content_dir\\$2\\$1$2.$srcfile"; }
$path = $root."\\".$ctg{$rec[0]}."\\".$ctg{$rec[1]}."\\".$ctg{$rec[2]}."\\".$lang{$rec[3]};
if (! -e $path) { mkpath($path, 0, 0777) or die "Can't create dir: $^E\n";}
$dstfile = $path."\\".$rec[4];
if (hardlink($srcfile, $dstfile, 1)) { $counter += 1; }
}
close(DAT);
print "\nTotal matching updates in database: $counter\n";
unlink($tmpfile) or die "Cannot unlink tmpfile: $^E";
warn "\nSuccess\n";
###########################################################################
###########################################################################################
# POSIX NTFS hard link to file
###########################################################################################
sub hardlink {
my $exist_file=shift;
my $new_file=shift;
my $is_rewrite = shift;
if(-e $new_file && $is_rewrite)
{ unlink ($new_file) or return 0; }
link ( $exist_file, $new_file ) or return 0;
return 1;
}
###########################################################################################
# pid processing
###########################################################################################
sub open_pid_file {
my $file=shift;
if(-e $file) {
my $fh=IO::File->new($file) or die "Can't open PID file $file: $^E";
$ppid=<$fh>;
die "Invalid PID file" unless $ppid=~ /^(\d+)$/;
die "Process already running with PID $ppid" if(kill 0 => $ppid);
warn "Removing PID file for defunct process ($ppid).\n";
die "Can't unlink PID file $file" unless -w $file && unlink $file;
}
$ppid=$$;
return IO::File->new($file,O_WRONLY|O_CREAT|O_EXCL,0644)
or die "Can't create $file: $^E\n";
}
###########################################################################################
END {
unlink "WSUSExtractor.pid" or die "Can't unlink PID file: $^E";
# warn("Stoping script (pid=$$)\n");
}
__END__
# ======== end of script ========
SYMPTOMS
2006-05-11 00:00:17 804 6a0 DnldMgr Failed job file: URL =
http://YOUR-WSUS-SERVER/Content/BE/89EC21DAC2F85E57261E8BB512611791D115F6BE.EXE,
local path =
C:\WINNT\SoftwareDistribution\Download\S-1-5-18\69f35ef3f4d9c83474c7aec2474f2798\Windows2000-KB908531-v2-x86-ENU.EXE
2006-05-11 00:00:17 804 6a0 DnldMgr Error 0x80244019 occurred while downloading update; notifying dependent calls.
# WARNING: Download failed, error =
0x80244019
2006-05-11 00:00:20 804 7bc DnldMgr WARNING: BITS job
{D06ABA6C-A950-40DE-818B-3904C9DB52CC} failed, updateId =
{962462BC-081F-4642-B30E-DB31D53F4B7B}.106, hr = 0x80190194, BG_ERROR_CONTEXT
= 5
# WARNING: Download failed, error =
0x80244019
2006-05-11 00:00:22 804 79c Report REPORT EVENT:
{CA06C2DC-56BA-4A00-B18D-E56C83175D92} 2006-05-11
00:00:17+0500 1 161 101 {2A39150D-E00B-4986-A5B0-5EFF45063DAB} 103 80244019 AutomaticUpdates Failure Content Download Error: Download failed.
DESCRIPTION
Error 0x80244019 translates to SUS_E_PT_HTTP_STATUS_NOT_FOUND - Http status 404 - object not found.
CAUSE
If you have URLScan installed on WSUS Server, then it might block *.exe downloads for WUA. Check URLScan logs under C:\WINNT\system32\inetsrv\urlscan.
WORKAROUND
If URLScan Tool is installed and set to block all *.exe files, then, the client computers (WUA) will not be able to download any of the patches or updates.
In order to correct this problem, you need to edit urlscan.ini to allow *.exe requests, and then restart Internet Information Services (IIS) or restart the WSUS server itself.
Edit the following in the urlscan.ini:
[Allow Extensions]
.exe
And remove ".exe" from
[Deny Extensions]
--
[Allow Verbs]
GET
HEAD
POST
OPTIONS
MORE INFORMATION
Basic Troubleshooting Steps using SUS with AU
http://www.faqshop.com/sus/default.htm?http://www.faqshop.com/sus/general/basic%20trobshootting%20sus.htm
SYMPTOMS
You see the following error on WSUS Replica Server (DSS) whilst trying to synchronize with WSUS Upstream Server (USS):
ApplicationException: Failed to approve some updates --->
System.Data.SqlClient.SqlException: Explicit deployments to updates that are
expired are not allowed.
at Microsoft.UpdateServices.ServerSync.CatalogSync
AgentCore.CatalogSyncThreadProcessReal(Boolean allowRedirect)
CAUSE
WORKAROUND
I am not aware of any way to UN-expire an update from WSUSAdmin Console on USS (Is there any way to cheat SUSDB??.).
So,
NOTE: This issue is supposed to be fixed in WSUS SP1.
To find the Revised updates which are expired, take a look at;
Once you decline the expired updates, perform a manual synchronization from DSS and this time it should sync successfully!
Managing the WSUS Automatic Updates Client Download, Install, and Reboot Behavior with Group Policy (Published: May 4, 2006)
Bobbie Harder [WSUS PM] has recently published an article on Security Guidance in Microsoft Security Newsletter - Volume 3, Issue 5. This is a MUST reading for new WSUS Admins.
http://www.microsoft.com/technet/community/columns/sectip/st0506.mspx
A Hands-On Guide to Hands-Off Updates with WSUS
This is a MUST reading for new WSUS Admins. New information has been added to this article on http://www.microsoft.com/technet/technetmag/issues/2005/11/HandsOn/default.aspx.
This web page solution by Robert Collewijn will display (search/extract update) information about the update files and there location within the content directory structure. This enables to search for updates on WSUS Server and can be downloaded locally.
The updates are stored in a content folder on the WSUS server with unrecognizable 40 character file name (C6C8B597D4268C65AFFC94C34F46C9147B109329.exe). This web page will display filename and download link & location associated with that unrecognizable 40 character file name. All you have to do is use the search option at top right to with the KB number. Give it a try!
STEP-BY-STEP
Download HotfixInfo.zip (inclusive the sub folders) into the following folder [C:\Program Files\Update Services\HotfixInfo]. Robert recommends this directory because the other Windows Server Update Service pages are also in the [C:\Program Files\Update Services] folder.
Open the [index.asp] file and change the following two (bold and italic) lines recording your confirguration.
'*** Define default variables *** Dim sWSUSContentDir, sWSUSContentSrv sWSUSContentDir = "F:\WSUS\WSUSContent\" sWSUSContentSrv = "http:\\WSUS\Content\"
More information on http://wsus.collewijn.info/main.php?page=hotfixinfo_enu.php
Note
If IIS is using anonymous access, then user IUSR_MachineName is used to access the SQL server database. This is a local machine account on the IIS machine. Make sure IUSR_MachineName is granted security access to SUSDB with public and db_owner database roles for SUSDB so that it can. Typically, you need to grant SELECT permission on object 'tbFile', database 'SUSDB', owner 'dbo.
How can I Approve multiple updates from WSUSAdmin?
You can select more than one update at a time and can simply select the newest one, scroll down, hit shift and selet the oldest one. You should then have them all selected and can approve them all at once.
Is there any tool that I can use ?
WSUSster is an update approval tool for Microsoft Windows Update Services (WSUS). Take a look at the screenshot on http://www.wsus.nl/images/wsuster_large.png
According to the authors of this tool, "A WSUS Server has a very bad interface for approving updates. That's why we decided to write our own approval tool which we called 'Wsuster'. We used the tool to migrate from SUS to WSUS. At this moment we use the tool also for approving the new security updates that are released every month. And it works like a charm. Just with a few mouse clicks, new updates are approved and old ones are removed!"
With the Wsuster approval tool you can:
To use the tool you must install it on your WSUS Server.
The current version of the Wsuster Tool v 1.0 is available on Wsuster.zip (238 KB)
If you have any comments or feedback then, you can contact the authors here.
MORE INFORMATION
WSUSter Approval Tool
http://www.wsus.nl/site/index.php?option=com_content&task=view&id=23&Itemid=38
WSUS.de is yet another WSUS Community Web-Site. This site is hosted in German language and I have used Google Translation (a free service) to translate in English. So here we go WSUS.de in English.
My first pick is Check WSUS (version 1.05.04.1). This .vbs script will Check WSUS Client / Windows Update Agent (WUA) Settings for any computer in the network. When you run this script, it will prompt you to enter Computer Name or IP Address of the machine that you want to check.
A copy of the script is as follows;
'---------------------START-----------------------
' Einstellungen f?r die automatischen Updates
'
http://www.wsus.de/
' Version 1.05.04.1
' Translated quick and dirty into English Marco Biagini
' mbiagini@ehsd.cccounty.us
'--------------------------------------------
On Error Resume Next
Set objWshNet = CreateObject("Wscript.Network")
const HKCU = &H80000001
const HKLM = &H80000002
strDefComputer = lcase(objWshNet.ComputerName)
Set oArgs = WScript.Arguments
If oArgs.Count = 0 Then
strComputer = InputBox("Please enter the name or IP address of the Computer that you want to check WSUS settings", "Automatic Updates", strDefComputer)
Else
strComputer = oArgs(0)
End If
If strComputer = "" Then
WScript.Quit
End if
strComputer = lcase(strComputer)
if left(strComputer,2)="\\" then
strComputer=right(strComputer,(len(strComputer)-2))
end if
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
If Err.Number <> 0 Then
msgbox "Unable to connect to:" & VBCRLF & VBCRLF & " " & strComputer & VBCRLF, vbCritical, "Communication Error"
WScript.Quit
End If
Resultmsg = "**** Results of WUA Settings ****" & VBCRLF & VBCRLF
strMsg = "No Auto Update: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAutoUpdate"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetNoAutoUpdate(dwValue) & VBCRLF & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF & VBCRLF
End If
strMsg = "Use WU Server: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "UseWUServer"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetUseWUServer(dwValue) & VBCRLF
If dwValue = "1" Then
strMsg = " - WSUS Server: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "WUServer"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetStringValue HKLM,strKeyPath,strValueName,strValue
Resultmsg = Resultmsg & strMsg & strValue & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF
End If
strMsg = " - WU Status Server: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "WUStatusServer"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetStringValue HKLM,strKeyPath,strValueName,strValue
Resultmsg = Resultmsg & strMsg & strValue & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF
End If
Else
Resultmsg = Resultmsg & VBCRLF
End If
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF
Resultmsg = Resultmsg & " - Client configured to receive Updates from windowsupdate.microsoft.com" & VBCRLF
End If
strMsg = " - TargetGroup: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "TargetGroup"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetStringValue HKLM,strKeyPath,strValueName,strValue
Resultmsg = Resultmsg & strMsg & strValue & VBCRLF & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF & VBCRLF
End If
strMsg = "AU Options: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "AUOptions"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetAUOptions(dwValue) & VBCRLF
If dwValue = "4" Then
strMsg = " - Scheduled Install Day: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduledInstallDay"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & getday(dwValue) & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF
End If
strMsg = " - Planned Installation Time: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "ScheduledInstallTime"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & dwValue &":00 - 24 hours 4:00 is 4 AM, 16:00 is 4 PM" & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF
End If
Else
Resultmsg = Resultmsg & VBCRLF
End If
Else
Resultmsg = Resultmsg & strMsg & "Value is not configured" & VBCRLF
strMsg = " - Benutzerdefinierte Einstellung: "
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
strValueName = "AUOptions"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetAUOptions(dwValue) & VBCRLF
If dwValue = "4" Then
strMsg = " - ScheduledInstallDay: "
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
strValueName = "ScheduledInstallDay"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & getday(dwValue) & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF
End If
strMsg = " - ScheduledInstallTime: "
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
strValueName = "ScheduledInstallTime"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & dwValue &":00" & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Automatic Updates are not configured" & VBCRLF
End If
Else
Resultmsg = Resultmsg & VBCRLF
End If
Else
Resultmsg = Resultmsg & strMsg & "Not configured" & VBCRLF
End If
End If
strMsg = " - NoAUShutdownOption: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAUShutdownOption"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetNoAUShutdownOption(dwValue) & VBCRLF & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF & VBCRLF
End If
strMsg = "AutoInstallMinorUpdates: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "AutoInstallMinorUpdates"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetAutoInstallMinorUpdates(dwValue) & VBCRLF & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value is not configured" & VBCRLF & VBCRLF
End If
strMsg = "DetectionFrequency: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "DetectionFrequency"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg &"Every " & dwValue &" Hours to search for updates"& VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value is not configured"& VBCRLF
End If
strMsg = "RebootRelaunchTimeout: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootRelaunchTimeout"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & dwValue &" Minutes to wait until system restart"& VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value is not configured" & VBCRLF
End If
strMsg = "RebootWarningTimeout: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RebootWarningTimeout"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & dwValue &" Minutes wait until system restart"& VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF
End If
strMsg = "NoAutoRebootWithLoggedOnUsers: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "NoAutoRebootWithLoggedOnUsers"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
Resultmsg = Resultmsg & strMsg & GetNoAutoReboot(dwValue) & VBCRLF
Else
Resultmsg = Resultmsg & strMsg & "Value not configured" & VBCRLF
Resultmsg = Resultmsg & " - Default: User will be presented with a 5 minutes countdown" & VBCRLF
End If
strMsg = "RescheduleWaitTime: "
strKeyPath = "Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
strValueName = "RescheduleWaitTime"
If RegValueExists(strKeyPath, strValueName) Then
oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
If dwValue = "0" Then Resultmsg = Resultmsg & strMsg & "Value not configured: " & dwValue & VBCRLF & VBCRLF End If
If dwValue = "1" Then Resultmsg = Resultmsg & strMsg & dwValue &" Minute" & VBCRLF & VBCRLF End If
If dwValue > "1" and dwValue < "61" Then Resultmsg = Resultmsg & strMsg & dwValue &" Minutes" & VBCRLF & VBCRLF End If
If dwValue > "60" Then Resultmsg = Resultmsg & strMsg & "Invalid Value" & dwValue & VBCRLF & VBCRLF End If
Else
Resultmsg = Resultmsg & strMsg & "Not Configured" & VBCRLF & VBCRLF
End If
Resultmsg = Resultmsg & "http://www.wsus.de" & VBCRLF & "Die Infoseite zu Windows Server Updates Services"
MsgBox Resultmsg,,strComputer
set oReg = nothing
Function GetNoAutoUpdate(Index)
Select Case Index
Case 0 GetNoAutoUpdate = "0 - Auto Update applied by GPO"
Case 1 GetNoAutoUpdate = "1 - No Auto Update is applied by GPO"
Case Else GetNoAutoUpdate = "Invalid Entry"
End select
End Function
Function GetUseWUServer(Index)
Select Case Index
Case 0 GetUseWUServer = "0 - Client is configured to receive updates from windowsupdate.microsoft.com"
Case 1 GetUseWUServer = "1 - Client is configured to receive updates from your WSUS Server"
Case Else GetUseWUServer = "Invalid Entry"
End select
End Function
Function GetDay(Index)
Select Case Index
Case "0" GetDay = "Every Day"
Case "1" GetDay = "Every Sunday"
Case "2" GetDay = "Every Monday"
Case "3" GetDay = "Every Tuesday"
Case "4" GetDay = "Every Wednesday"
Case "5" GetDay = "Every Thursday"
Case "6" GetDay = "Every Friday"
Case "7" GetDay = "Every Saturday"
Case Else GetDay = "Invalid Entry"
End select
End Function
Function GetAUOptions(Index)
Select Case Index
Case "0" GetAUOptions = "0"
Case "1" GetAUOptions = "1 - Deaktiviert in den Benutzereinstellungen"
Case "2" GetAUOptions = "2 - Notify before download and Install."
Case "3" GetAUOptions = "3 - Autom. Download, notify before installation."
Case "4" GetAUOptions = "4 - Autom. Download, install according to GPO settings."
Case "5" GetAUOptions = "5 - Allow Local Administator installation and manual configuration."
case Else GetAUOptions = "Invalid Entry"
End select
End Function
Function GetNoAUShutdownOption(Index)
Select Case Index
Case 0 GetNoAUShutdownOption = "0 - 'Updates are being installed and system will be restarted' user ill be notified"
Case 1 GetNoAUShutdownOption = "1 - 'Updates are being installed and system will be restarted' user will NOT be notified"
Case Else GetNoAUShutdownOption = "Invalid Entry"
End select
End Function
Function GetAutoInstallMinorUpdates(Index)
Select Case Index
Case 0 GetAutoInstallMinorUpdates = "0 - Automatic updates are not immediately installed"
Case 1 GetAutoInstallMinorUpdates = "1 - Automatic updates are immediately installed"
Case Else GetAutoInstallMinorUpdates = "Invalid Entry"
End select
End Function
Function GetNoAutoReboot(Index)
Select Case Index
Case "0" GetNoAutoReboot = "0 - User Countdown of 5 Minutes"
Case "1" GetNoAutoReboot = "1 - User will be notified before a system restart"
case Else GetNoAutoReboot = "Invalid Entry"
End select
End Function
Function RegValueExists(sRegKey, sRegValue)
sRegKey = Trim(sRegKey)
sRegValue = LCase(Trim(sRegValue))
' init value
RegValueExists = False
If oReg.EnumValues(HKLM, sRegKey, aValueNames, aValueTypes) = 0 Then
If Not IsNull(aValueNames) Then
For i = 0 To UBound(aValueNames)
If LCase(aValueNames(i)) = sRegValue Then
RegValueExists = True
End If
Next
End If
End If
End Function
Function RegKeyExists(sRegKey)
sRegKey = Trim(sRegKey)
If oReg.EnumValues(HKLM, sRegKey, aValueNames, aValueTypes) = 0 Then
RegKeyExists = True
Else
RegKeyExists = False
End If
End Function
'---------------------END-----------------------
MORE INFORMATION
Translated version of http--www.wsus.de-
http://translate.google.com/translate?hl=en&sl=de&u=http://www.wsus.de/&prev=/search%3Fq%3Dwsus.de%26hl%3Den%26lr%3D%26safe%3Dactive
View Original Web Page in german language
http://www.wsus.de/
Check WSUS (version 1.05.04.1)
http://downloads.wsus.de/check_wsus/Check_WSUS_eng.zip
http://downloads.wsus.de/check_wsus/Check_WSUS_ger.zip
So, how do you force the update detection? In this blog entry, let's take a look at some of the techniques.
' ---------------START CODE---------------
strComputer = inputbox("Enter a computer name to run WUA detectnow","Invoke detectnow")
if strComputer = "" then wscript.quit
on error goto 0
Set autoUpdateClient = CreateObject("Microsoft.Update.AutoUpdate",strComputer)
AutoUpdateClient.detectnow()
wscript.echo "All done."
' ----------------END CODE-----------------
MORE INFORMATION
Force remote computer to perform wuauclt.exe /detectnow (WSUS) - using object methods
http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=242
Execute a Windows Update Detect Cycle on a Remote Computer
http://www.microsoft.com/technet/scriptcenter/csc/scripts/software/update/cscsw026.mspx
WSUS - DETECTNOW 2.0
http://downloads.wsus.de/wsus_detect_now/WSUS_detect_now_2.0_eng.exe
http://downloads.wsus.de/wsus_detect_now/WSUS_detect_now_2.0_ger.exe
Quick AU Client Detection & Installation with Windows Server Updates Services, WSUS
http://msmvps.com/blogs/athif/archive/2005/06/29/56200.aspx
WSUS: Script to Force the Update Detection from Automatic Update Client (WUA) for updates on WSUS Server
http://msmvps.com/blogs/athif/articles/66375.aspx
Windows Update Agent force script, email results version 2.15 by -- Rob Dunn[WSUS MVP]
http://msmvps.com/blogs/athif/archive/2006/05/09/94089.aspx
SYMPTOMS
You see the following errors in "%Windir%\WindowsUpdate.log".
FATAL: Failed to get session from datastore, error = 0x80004002
FATAL: Failed to Unserialize from data store, error = 0x80004002
WARNING: Exit code = 0x80004002
WARNING: InitAUComponents Failed, will restart AU in 30 mins, error = 0x80004002
DnldMgr FATAL: DM:CAgentDownloadManager::CheckAllCallDownloadStates: GetSession failed with 0x80004002.
WORKAROUND
Try the following steps; Some of these steps might work. Rename/Delete "%Windir%\WindowsUpdate.log" before you start to see the latest detection.
1. If you have a proxy server -
2. Re-create the Datastore -
3. Try to force install WUA.
NOTE:
MORE INFORMATION
Error 0x80072efd
http://msmvps.com/blogs/athif/archive/2006/05/08/Error_80072efd.aspx
Force Update Detection
http://msmvps.com/blogs/athif/archive/2006/05/15/95060.aspx
I don't see SQL Updates in WSUSAdmin?
You are not alone. Microsoft has not yet released any SQL updates to WSUS 2.0. As of today (5/17/2006) there is no SQL update content on WSUS 2.0. However, there are some updates for WMSDE but they are not classified as SQL Server updates.
So, if you are looking for a report of some/specific or all WSUS Clients, then you might want to check out Rob Dunn's script 'WSUS_Client_Report.vbs'.
This is really great. For instance, If I want to view a report of all WSUS Client computers in my Active Directory domain, then I can just enter any common letter such as "A" or "." or "com" or "Domain-Name" in the input box and hit OK. Voila! You will see a report of all WSUS Client computers.
This is very sweet. Thanks Rob!
NOTES:
' -------------------START SCRIPT------------------
'Input name of computer and link directly to that computers' WSUS report.
'
'You must be in the WSUS admins group on the server you are querying against
'You must have access to the database to perform queries
'
'An html page will be generated with a list of computers that matched the
' search criteria you specified.
Const ForWriting = 2
Dim strComputerID, t, strComputerIDArray
'Your WSUS server. If you are running remote SQL, enter your SQL server name
' here instead.
strWSUSDBServer = "sadadsms-mn"
'Your WSUS server - i.e. where you run the administration from. If you are
' not running remote SQL, then this variable should be the same as the variable
' above.
strWSUSServer = "sadadsms-mn:8530"
'Set some font settings for our HTML page.
fface = "arial"
fcolor = "black"
fsize = "2"
Set myconn = CreateObject("adodb.connection")
strComputer = InputBox("Enter the search criteria for the computer name you wish to " _
& "retreive statitistics for:","Enter computer name search text")
'If nothing was entered, then quit.
If strComputer = "" Then wscript.quit
'set up the connection string. This is using Windows NT authentication
' noted by Integrated Security=SSPI.
connection = "Provider=SQLOLEDB;" & _
"Data Source=" & strWSUSDBServer & ";" & _
"Initial Catalog=SUSDB;" & _
"Integrated Security=SSPI"
'Open the connection to the database.
myconn.open (connection)
'Set some objects.
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("PROCESS")
Set ws = wscript.CreateObject("Scripting.FileSystemObject")
Set result = CreateObject("adodb.recordset")
'Define our temporary report index file.
tempfile = WshSysEnv("TEMP") & "\" & "WSUS_Computer_Report.htm"
'Open the file for writing.
Set t = ws.OpenTextFile (tempfile, ForWriting, True)
'Generate the HTML
Call setupHTM("begin")
'Create a SQL string that would bring back the results where the fulldomainname field has any instance
' of the strcomputer text in it.
SQL = "SELECT computerID,FullDomainName from tbComputerTarget WHERE FullDomainName LIKE '%" & strComputer & "%'"
'Run the query.
Call GetComputerInfo
'Close the HTML
Call SetupHTM("end")
'If no search results were found, produce a msgbox and exit.
If strComputerID = "" Then
msgbox "No computers with %" & strComputer & "% in the computer name field does not appear in the WSUS database specified on " _
& "the server " & strWSUSServer & "."
wscript.quit
Else
'otherwise, open up the html page.
Set oShell = CreateObject("WScript.Shell")
oShell.Run tempfile,1,false
End If
Sub GetComputerInfo
set result = myconn.execute(SQL)
if not result.EOF then
While not result.EOF
'Put the field results for ComputerID into the strComputerID variable
strComputerID = result("ComputerID")
'Put the field results for FullDomainName into the strComputer variable
strComputer = result("FullDomainName")
'Write the hyperlink into a table row in the html file.
t.writeline("<tr><td><font face='" & fface & "' color='" _
& fcolor & "' size='" & fsize & "'><a href='http://" & strWSUSServer _
& "/WsusAdmin/Reporting/ComputerDetailsReport.aspx?computerId=" & strComputerID & "'>" _
& strComputer & "</a></font></td></tr>")
'Move to the next record.
result.movenext()
Wend
Else
End If
End Sub
Function SetupHTM(strVar)
'If this is the beginning of the file, set up the head, title, and table for the page.
If LCase(strVar) = "begin" Then
t.writeline ("<html><head><title> WSUS Search Results </title></head><body>")
t.writeline ("<font face='" & fface & "' color='" & fcolor & "'><strong>" _
& " Click on a computername to view the WSUS client report.</strong></font><table>")
ElseIf LCase(strVar) = "end" Then
'if this is the end of the file, close out the table and html code. Then close the
' file entirely.
t.writeline ("</table></html>")
t.close
End If
End Function
' --------------------END SCRIPT-------------------
MORE INFORMATION
Shortcut to particular WSUS client report
http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=206&posts=1&start=1
The VBScript code below from Scripting Guru Torgeir Bakken (MVP) checks if the new AU client is needed on the computer, and runs WindowsUpdateAgent20-x86.exe if required in silent mode. Thanks Torgeir.
NOTES:
The script uses the IWindowsUpdateAgentInfo::GetInfo method instead of checking the version of the file wuaueng.dll. Also, if the interface does not exist because the AU client is to old, the script will install the client. The script below uses both methods to check for an already up to date version.
'--------------------8<----------------------
Option Explicit
Dim strExePath, bolUpdateNeeded, objAgentInfo
Dim intMajorVersion, objShell
' prefix with an UNC path if necessary
strExePath = "WindowsUpdateAgent20-x86.exe"
bolUpdateNeeded = True ' init value, do not touch
On Error Resume Next
Set objAgentInfo = CreateObject("Microsoft.Update.AgentInfo")
If Err.Number = 0 Then
' object exists, now check if ApiMajorVersion is 3 or higher
intMajorVersion = 0 ' init value
intMajorVersion = objAgentInfo.GetInfo("ApiMajorVersion")
If intMajorVersion >= 3 Then
bolUpdateNeeded = False
End If
End If
On Error Goto 0
If bolUpdateNeeded Then
Set objShell = CreateObject("WScript.Shell")
' install the AU client
objShell.Run strExePath & " /quiet /norestart", 1, True
End If
'--------------------8<----------------------
MORE INFORMATION
Determining the Current Version of WUA
http://msdn.microsoft.com/library/en-us/wua_sdk/wua/determining_the_current_version_of_wua.asp?frame=true
Re-installing Windows Update Agent (WUA)
http://msmvps.com/blogs/athif/archive/2006/04/05/Re_Installing_WUA.aspx
Automatic Update Client Versions History
http://msmvps.com/blogs/athif/archive/2005/06/15/Automatic_Update_Client_Versions_History.aspx
For x86-based computers (WindowsUpdateAgent20-x86.exe)
http://go.microsoft.com/fwlink/?LinkId=43264
For x64-based computers (WindowsUpdateAgent20-x64.exe):
http://go.microsoft.com/fwlink/?LinkId=43265
SYMPTOMS
So, Today I saw error 0x80080008 in "%Windir%\WindowsUpdate.log".
DnldMgr FATAL: DM:CBitsJob::SetCallbackHandler: SetNotifyInterface failed with 0x80080008.
and eventually Download Manager failed. Looking at "%Windir%\WindowsUpdate.log" I saw the following statement - AU AU Restart required.... Also, I could see downloads in "%Windir%\SoftwareDistribution\Download" folder.
Looking at the Event Log, I realized the computer was rebooted and Automatic Updates Service was set to MANUAL and obviously stopped.
I immediately restarted the service and forced update detection and the error is gone.
DnldMgr Download manager restoring 2 downloads
Agent * Succeeded to load 2 persisted download calls
DnldMgr Retrieved 2 persisted download jobs
DnldMgr * Restored download job.
The computer succesfully updated.
So, before you apply Microsoft Security Bulletin MS06-019 on Exchange Servers - Be careful. Take a look at the known issues.
912918 (http://support.microsoft.com/kb/912918/) Users cannot send e-mail messages from a mobile device or from a shared mailbox in Exchange 2000 Server and in Exchange Server 2003.
First, Find accounts that have the Full Mailbox Access permission without the Send As permission using the script from http://support.microsoft.com/kb/912918/ and grant the Send As permission either manually using DSA.msc or using the script -SetAll switch.
And then, you are ready to apply MS06-019.
Continuing from my previous posts What can you expect in WSUS 3.0?, Fabrice Meillon posted more information on WSUS 3.0. I am excited to see all those new features and improvements.
In short;
MORE INFORMATION
WSUS 3.0 (What's new)
http://blogs.technet.com/fabricem_blogs/archive/2006/05/06/427461.aspx
When can you expect WSUS 3.0?
http://msmvps.com/blogs/athif/archive/2006/04/18/When_can_you_expect_WSUS_3_0.aspx
What can you expect in WSUS 3.0?
http://msmvps.com/blogs/athif/archive/2006/04/12/What_can_you_expect_in_WSUS_3_0.aspx
WSUS 2.0 Reporting Rollup Tool Sample
http://msmvps.com/blogs/athif/archive/2005/09/04/65172.aspx
WSUS 2.0 will not support HOTFIX installation - So what is the deal?
http://msmvps.com/blogs/athif/archive/2006/04/16/WSUS_will_not_support_HOTFIX_installation_So_what_is_the_deal.aspx#93793
WSUS 2.0 Replica Down Stream Server (DSS) - Issues and FAQ
http://msmvps.com/blogs/athif/archive/2006/04/24/WSUS_Replica_Down_Stream_Server_DSS_Issues_and_FAQ.aspx#93796
How do I change WSUS 2.0 Server to the Replica Mode??
http://msmvps.com/blogs/athif/archive/2005/09/10/66061.aspx
Is WSUS 2.0 compatible with SQL Server 2005?
http://msmvps.com/blogs/athif/archive/2006/04/19/WSUS_and_SQL_Server_2005.aspx#93797
SYMPTOMS
You see the following warnings in %Windir%\WindowsUpdate.log;
WARNING: DownloadFileInternal failed for http://w2ksvr1:8530 /selfupdate/wuident.cab: error 0x80072ee5
And, you see the following from the output of ClientDiag Tool;
Checking Connection to WSUS/SUS Server
WUServer = http://w2ksvr1:8530
WUStatusServer = http://w2ksvr1:8530
UseWuServer is enabled. . . . . . . . . . . . . . . . . PASS
VerifyWUServerURL() failed with hr=0x80072ee5
The URL is invalid
DESCRIPTION
Error 0x80072EE5 translates to Error_Internet_Invalid_URL.
CAUSE
The URL certainly looks valid -- but if you take a close look (Kudos to Lawrence Garvin), there is a
space after the port number of the URL.
LESSON LEARNED
Be patient while you configure WUAU.adm Template in Group Policy. Make sure there is no extra space and trailing slash in the policy definition for WUServer and WUStatusServer. So, as a workaround - Update the Group Policy accordingly.
[To have the most up to date wuau.adm file, use the wuau.adm file that the WSUS installation places in the folder %windir%\inf\ on the WSUS or from any Windows 2003 SP1 server in the folder %windir%\inf.]
SYMPTOMS
You see error 0x800706BE in "%Windir%\WindowsUpdate.log";
# WARNING: Install failed, error = 0x800706BE.
2006-05-06 12:16:08 1268 520 AU # WARNING: Install failed, error = 0x800706BE
2006-05-06 12:16:08 1268 ba8 DnldMgr Preparing update for install, updateId = {BA9628B9-50A0-4C17-8DC1-ADEDBD6AC0CE}.100.
2006-05-06 12:16:08 1268 ba8 DnldMgr Preparing update for install, updateId = {F3744BAF-204E-411F-8B10-E976FD9D4520}.101.
2006-05-06 12:16:08 1268 520 AU >>## RESUMED ## AU: Installing update [UpdateId = {58305952-B8B4-4983-8685-09995FBC05E6}]
2006-05-06 12:16:08 1268 520 AU # WARNING: Install failed, error = 0x800706BA
2006-05-06 12:16:08 1268 520 AU >>## RESUMED ## AU: Installing update [UpdateId = {0B70C46A-7A2A-4272-A668-08A6145D1C72}]
2006-05-06 12:16:08 1268 520 AU # WARNING: Install failed, error = 0x800706BA
2006-05-06 12:16:08 1268 ba8 Agent WARNING: WU client fail to get handler to install update with error 0x800706ba
2006-05-06 12:16:08 1268 520 AU >>## RESUMED ## AU: Installing update [UpdateId = {E90EA7A3-884E-4084-9C72-AF8B7A91AB5D}]
2006-05-06 12:16:08 1268 520 AU # WARNING: Install failed, error = 0x800706BA
DESCRIPTION
Error 0x800706BE translates to RPC_S_CALL_FAILED.
WORKAROUND
Make sure Remote Procedure Call (RPC) is started. Background Intelligent Transfer Service (BITS) and Windows Installer Service are dependent on Remote Procedure Call (RPC) service and if RPC is not started BITS and Windows Installer will fail and eventually the updates are not installed.
Somehow RPC service was hung and a quick reboot helped to start the service automatically and updates installed successfully.
SYMPTOMS
WSUS server fails to download the updates. The status remains the same - On the WSUSAdmin console home page it states under Status of Downloads;
Updates needing Files:nnn.
Downloading 0.00MB of nnn.00 MB.
And, you see the following error in "%Windir%\WindowsUpdate.log" of the client;
1 161 101 {4B0F3F28-6DB6-4BF1-87B1-693E51AC7F3A} 100 80244019
AutomaticUpdates Failure Content Download Error: Download failed.
CAUSE
WUA is not downloading the updates on the clients because of 0x80244019 aka HTTP '404' error (File Not Found) on WSUS Server. WSUS Server is not downloading the content and so Synchronization hangs. See the Resolution;
RESOLUTION
To troubleshoot this behavior, you have to check if there is any Error in Application Event Log on WSUS Server. WSUS Synchronization hangs if Content download fails for the following reasons;
SYMPTOMS
WARNING: GetCookie failure, error = 0x8024400D, soap client error = 7, soap error code = 300, HTTP status code = 200
WARNING: SOAP Fault: 0x00012c
WARNING: faultstring:Fault occurred
WARNING: ErrorCode:ConfigChanged(2)
WARNING: Message:
WARNING: Method:"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetCookie"
WARNING: ID:4e774ffe-d529-4f84-888e-ac1668cf7178
Initializing simple targeting cookie, clientId = 63cec5fc-fab0-49d9-9859-8933a7cd0f6c, target group = <>, DNS name = <FQDN> Server URL = http://wsusserver:8530/SimpleAuthWebService/SimpleAuth.asmx
Uploading 1 events using cached cookie, reporting URL = http://wsusserver:8530/ReportingWebService/ReportingWebService.asmx
Reporter successfully uploaded 1 events.
CAUSE
The problem can be caused by a known issue with Internet Information Services 6.0 and http.sys.
RESOLUTION
A supported hotfix is now available from Microsoft. This hotfix does require Service Pack 1 be installed to the Windows Server 2003. You must restart the computer after you apply this hotfix.
HOTFIX INFORMATION
FIX: IIS 6.0 may send an "HTTP 100 Continue" response in the middle of the response stream when you send a POST request
http://support.microsoft.com/?id=898708
SYMPTOMS
You see the following errors in "%Windir%\WindowsUpdate.log"
WARNING: Send failed with hr = 80072efd.
WARNING: SendRequest failed with hr = 80072efd. Proxy List used: <(null)> Bypass List used : <(null)> Auth Schemes used : <>
WARNING: WinHttp: SendRequestUsingProxy failed for <http://wsusserver:8530/selfupdate/wuident.cab>. error 0x80072efd
WARNING: WinHttp: SendRequestToServerForFileInformation MakeRequest failed. error 0x80072efd
WARNING: WinHttp: SendRequestToServerForFileInformation failed with 0x80072efd
WARNING: WinHttp: ShouldFileBeDownloaded failed with 0x80072efd
WARNING: DownloadFileInternal failed for http://wsusserver:8530/selfupdate/wuident.cab: error 0x80072efd
FATAL: IsUpdateRequired failed with error 0x80072efd
WARNING: SelfUpdate: Default Service: IsUpdateRequired failed: 0x80072efd
WARNING: SelfUpdate: Default Service: IsUpdateRequired failed, error = 0x80072EFD
* WARNING: Skipping scan, self-update check returned 0x80072EFD
* WARNING: Exit code = 0x80072EFD
WARNING: WU client failed Searching for update with error 0x80072efd
DESCRIPTION
Error 0x80072efd translates to ERROR_INTERNET_CANNOT_CONNECT which means 'The attempt to connect to the server failed'.
CAUSE
WUA uses WinHTTP proxy settings to access WSUS Server. WinHTTP proxy settings are separate from the proxy settings in Microsoft? Internet Explorer. If you are using Proxy server to access internet and proxy settings are configured for IE and at the same time, If WinHTTP proxy settings are set to null, then sometimes WUA fails with the errors as seen above.
Use ClientDiag Tool which will check for WinHTTP local machine Proxy settings and User IE Proxy settings. In the below sample, WinHTTP local machine Proxy settings is set to Direct Connection whereas User IE Proxy settings is set to a local proxy server.
Checking Proxy Configuration
Checking for winhttp local machine Proxy settings . . . PASS
Winhttp local machine access type
<Direct Connection>
Winhttp local machine Proxy. . . . . . . . . . NONE
Winhttp local machine ProxyBypass. . . . . . . NONE
Checking User IE Proxy settings . . . . . . . . . . . . PASS
User IE Proxy
proxy:8080
User IE ProxyByPass
10.*;;<local>
User IE AutoConfig URL Proxy . . . . . . . . . NONE
User IE AutoDetect
AutoDetect not in use
In such case, send request will fail with 80072efd as it is set to null proxy (no proxy).
WORKAROUND
To troubleshoot this error, configure WinHTTP local machine Proxy settings to use User IE Proxy settings using the command 'proxycfg.exe -u' (This command imports the Internet Explorer proxy settings of the current user).
Run 'proxycfg.exe -u' command followed by ClientDiag. The sample below shows Winhttp local machine Proxy Settings are now cloned to User IE Proxy settings.
Checking Proxy Configuration
Checking for winhttp local machine Proxy settings . . . PASS
Winhttp local machine access type
<Using Proxy>
Winhttp local machine Proxy
proxy:8080
Winhttp local machine ProxyBypass
10.*;;<local>
Checking User IE Proxy settings . . . . . . . . . . . . PASS
User IE Proxy
proxy:8080
User IE ProxyByPass
10.*;;<local>
User IE AutoConfig URL Proxy . . . . . . . . . NONE
User IE AutoDetect
AutoDetect not in use
Note:
Now, Restart Automatic Updates Service (MUST) and force an update detection using the command 'wuauclt.exe /detectnow' and the error should disappear and WUA will start downloading the approved updates.
MORE INFORMATION
Using the WinHTTP Proxy Configuration Utility
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/8214dcb7-7a53-4a8c-b91a-02772c06ad7d.asp
So, these days I am trying to collect information (as much as I can) on WSUS Scripts & WSUS Tools in the community and host a dedicated blog for WSUS Scripts & Tools Repository.
If you are aware of any such tools then kindly let me know. You can either Contact me or drop a comment.
New!!! WSUS Scripts and WSUS Tools Repository!. Stay tuned!.
Rob Dunn [WSUS MVP] has created an excellent .vbs script (updatehf.vbs) which is very popular in WSUS Community. This script will do the following;
Before you run this script, rename the downloaded script to updatehf.vbs and you need to edit some variables in the script;
MANDATORY VARIABLES
OPTIONAL VARIABLES
If you don?t configure these optional variables, then you can manually input them from the command line.
Command line switches to run the script
Note:
The command line switches will supersede the variables in the script.
Examples
Kudos to Rob and all those who have contributed. Once again thanks a lot Rob.
DOWNLOAD the latest version from http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=199&start=1 (current version 2.15)
If you have any issues/comments/bugs/suggestions or just want to say thanks to Rob, then reply to the on-going discussion on Windows Update Agent force script, email results version 2.15
So, if you are in a workgroup environment and would like to configure WUA on workstations, then you might want to check WSUSClientManager - an Excel automation tool by Greg Chapman.
Greg recently posted this information on WSUS Mailing List;
WSUSClientManager is created in Excel 2003. Operation is simple and requires you to set your Excel macro security to Medium. Medium allows you to be prompted about disabling or enabling macros in an Excel document. The default setting is high and will prevent the VBA code in the spreadsheet from executing.
Open the Excel doc and enable macros when prompted. The AllHosts sheet is the one in which, starting with row 2, column A, you can list the NetBIOS names or IP addresses of your individual servers or desktops, read and write all the WSUS settings to all those hosts. The Individual Host Test sheet is intended to allow you to list a single host, read its settings, modify them and then write them back to the host without cycling through all your listed hosts. So, deal with your complete set of hosts on the AllHosts sheet and with only one or two on the Individual Host Test sheet.
Once you've listed your hosts, go to the MouseTrax WSUS Client Manager Menu and choose "Read WSUS Settings From Hosts". This will retrieve any settings you've already configured on the host and write them to the spreadsheet. For each host, modify whichever settings you need to change and then, from the MouseTrax WSUS Client Manager menu, choose "Write WSUS Settings To Hosts". Any errors in either operation will be written back to the spreadsheet in each host's row in order to aid client troubleshooting.
Notes:
When you use the "Write Settings..." menu choice, each host is issued the "wuauclt /resetauthorization /detectnow" command to initialize a scan from the host to the WSUS server.
This tool requires your hosts meet the following conditions:
- the account you are using has administrative access to the host
- Remote Registry service running on each host
- DCOM is enabled on each host
- WMI is running and you have administrative privileges under delegation on each host
MORE INFORMATION
WSUSClientManager
http://www.mousetrax.com/pub/wsusclientmanager.zip
Building a Small Office Automated Patching System Without Active Directory
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=594
Configure Automatic Updates in a Non?Active Directory Environment
http://technet2.microsoft.com/WindowsServer/en/Library/b23562a8-1a97-45c0-833e-084cd463d0371033.mspx?mfr=true
MouseTrax - Downloads
http://www.mousetrax.com/Downloads.html
This script by Alexander Suhovey will extract/copy particular updates from WSUS content folder. WSUS stores updates in \WSUSContent folder using SHA1 hash for file names and this script will attempt to decrypt SHA1 hash for file names by querying WSUS SQL/MSDE database and then exports those updates as well.
Command line switches to run the script
SYNTAX: WSUSExtract.cmd <-f:search_string> [-l:lang] [-t:target]
Examples
The command below will Copy downloaded English updates corresponding 896358 KB article to 'c:\temp' folder
WSUSExtract.cmd -f:896358 -l:enu -t:c:\temp
The command below will output/display/View all downloaded updates corresponding to 896358 KB article:
WSUSExtract.cmd -f:896358
Copy the code below in a text file and name it as 'WSUSExtract.cmd'.
::======== start of script ========
:: Batch script to 'extract' particular updates from WSUS content folder.
::
:: The problem with content folder is that WSUS stores updates using SHA1 hash for
:: file names so it is difficult to determine what file belongs to what
:: update. The script determines a human-readable name of update file byquerying
:: WSUS SQL/MSDE database.
::
:: ====================================================================
:: SYNTAX: WSUSExtract.cmd <-f:search_string> [-l:lang] [-t:target]
::
:: -f:search_string - Part of update KB to search for.
::
:: -l:lang - Update language. If omitted, all languages will be processed.
::
:: -t:target - Target folder to copy updates to. If omitted, script assumes 'View Only' mode.
::
:: EXAMPLES:
:: Copy downloaded english updates corresponding 896358 KB article to 'c:\temp'folder:
:: WSUSExtract.cmd -f:896358 -l:enu -t:c:\temp
::
:: View all downloaded updates corresponding to 896358 KB article:
:: WSUSExtract.cmd -f:896358
:: ====================================================================
::
::*************************************************************************
:: Name: WSUSExtract.cmd
::
:: Purpose: Finds and copies particular update(s) from WSUS content folder.
::
:: Syntax: WSUSExtract.cmd <-f:search_string> [-l:language] [-t:target_folder]
::
:: Version: 1.1
:: Technology: NT Batch
::
:: Requirements: Windows 2000+
:: REG.EXE (in case of Windows 2000, install Support Tools or download REG.EXE from
:: http://www.dynawell.com/reskit/microsoft/win2000/reg.zip)
:: OSQL.EXE Utility (included in MSDE)
::
:: Authors: Alexander Suhovey
::
:: History: 08/07/2005 - Database server address is now determined from registry
:: 08/05/2005 - First release.
::*************************************************************************
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
Echo.
::========= OS Check ============
if not "%OS%" == "Windows_NT" goto BADOS
if "%APPDATA%" == "" goto BADOS
::====== Parse command line =====
If "%1"=="" GOTO USAGE
If "%1"=="/?" GOTO USAGE
If "%1"=="-?" GOTO USAGE
:PARSE
set arg=%1
shift /1
If not defined arg GOTO NEXT
If "%arg:~0,3%"=="-f:" (set fstr=%arg:~3%&GOTO PARSE)
If "%arg:~0,3%"=="-l:" (set lang=%arg:~3%&GOTO PARSE)
If "%arg:~0,3%"=="-t:" (set target=%arg:~3%&GOTO PARSE)
Echo ERROR: Unknown argument: %arg%
GOTO USAGE
:NEXT
If defined target (
set target=%target:"=%\
If not exist "%target%" echo ERROR: Cannot find target folder: "%target%" & goto :eof
) Else (
set viewonly=1
Echo Target folder not defined. Assuming View Only mode.
echo.
)
::== Find WSUS content folder ===
::=== and SQL server address ===
set regkey="HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup"
for /f "tokens=2* delims= " %%i in ('reg query %regkey% /v ContentDir ^| find "ContentDir"') do set source=%%j
If not defined source Echo ERROR: Cannot find WSUS content folder in registry. Check if WSUS is installed. & goto :eof
set source=%source%\WsusContent
for /f "tokens=2* delims= " %%i in ('reg query %regkey% /v SqlServerName ^| find "SqlServerName"') do set server=%%j
If not defined server Echo ERROR: Cannot find WSUS database server in registry. Check if WSUS is installed. & goto :eof
set osqlcommand=osql.exe -w 500 -h-1 -E -d SUSDB -S %server%
::====== Test SQL database ======
::========= connection ==========
for /f "delims=" %%i in ('%osqlcommand% -Q') do (
Echo ERROR: Cannot connect to WSUS SQL server '%server%'
goto :eof
)
::=== Format osql.exe query =====
set query=select FileDigest,FileName from tbFile
If defined fstr set query=%query% where FileName like '%%%fstr%%%'
If defined lang (
If defined fstr (set query=!query! and) Else (set query=!query! where)
set query=!query! FileName like '%%%lang%%%'
)
::======== Main section =========
set num1=0
set num2=0
echo ========================================
for /f "tokens=1,2" %%i in ('%osqlcommand% -Q "%query%" ^| find /v "rows affected"') do (
set /a num1+=1
set dstfile=%%j
set srcfile=%%i
set srcfilepath="%source%\!srcfile:~-2!\!srcfile:~2!.!dstfile:~-3!"
set dstfilepath="%target%%%j"
If exist !srcfilepath! (
set /a num2+=1
If defined viewonly (
echo !dstfile!
) Else (
If exist !dstfilepath! set dstfilepath="%target%%%~nj(Copy !random!)%%~xj"
set /p foo="Copying !dstfile! ... "<nul
copy !srcfilepath! !dstfilepath! >nul 2>&1
If errorlevel 1 (echo FAILED.) Else (echo Done.)
)
)
)
echo ========================================
echo Updates found in content folder : %num2%
echo Total matching updates in database : %num1%
goto :eof
::========= Echo syntax =========
:USAGE
echo.
Echo %~nx0
Echo Finds and copies particular update(s) from WSUS content folder.
Echo Renames updates to human-readable format using information
Echo obtained from local WSUS SQL database.
Echo.
Echo SYNTAX: %~nx0 ^<-f:search_string^> [-l:lang] [-t:target]
Echo.
Echo -f:search_string - Part of update name to search for.
Echo Naming format for OS updates: OS-KBNUMBER-HW-LANG.EXT
Echo OS - Operating system (eg 'WindowsXP')
Echo KBNUMBER - MSKB number (e.g 'KB896358')
Echo HW - Hardware technology ('x86', 'ia64' etc)
Echo LANG - OS language (see -l switch below)
Echo EXT - Extention ('exe', 'cab' etc)
Echo -l:lang - Update language. If omitted, all languages will
Echo be processes. Examples are:
Echo rus - russian
Echo enu - english
Echo fra - french
Echo deu - deutch
Echo -t:target - Target folder to copy updates to.
Echo If omitted, script assumes 'View Only' mode.
Echo Do not use trailing slash.
Echo.
Echo EXAMPLES:
Echo.
Echo Copy downloaded english updates corresponding
Echo to 896358 KB article to 'c:\temp' folder:
Echo.
Echo %~nx0 -f:896358 -l:enu -t:c:\temp
Echo.
Echo View all downloaded updates corresponding to 896358 KB article:
Echo.
Echo %~nx0 -f:896358
Echo.
goto :eof
::===== If Bad OS detected ======
:BADOS
echo.
echo ERROR: This script needs Windows 2000 or better.
goto :eof
::======== End of script ========
WSUS SP1 is finally released. Besides delivering updates, Windows Server Update Services with Service Pack 1 (WSUS SP1) includes support for Microsoft SQL Server 2005 and the forthcoming Windows Vista operating system. It also provides additional stability and performance improvements. After you install WSUS SP1, you may be required to restart your computer. Note: You cannot remove WSUS SP1 after you install it.
Download Windows Server Update Services with Service Pack 1
http://www.microsoft.com/windowsserversystem/updateservices/downloads/WSUSSP1.mspx
Download WSUS SP1 only - Download the KB919004-x86.exe package now.
http://download.microsoft.com/download/f/6/d/f6d9eb30-2612-47f7-b14a-41a47e8a9a8e/wsus2-kb919004-x86.exe
Description of Windows Server Update Services Service Pack 1
http://support.microsoft.com/?kbid=919004
Updating Microsoft Windows Vista Beta 2 Computers via WSUS
http://technet2.microsoft.com/WindowsServer/f/?en/Library/70c3aea9-4dc2-49ad-a085-dc1b59f1af7d1033.mspx
Readme for WSUS Service Pack 1
http://download.microsoft.com/download/7/d/c/7dce8ed3-8d44-421f-902c-95391577ecb5/ReadMe.htm
Report your issues on microsoft.public.windows.server.update_services
Brian McCann wants to know a better way to Check the Version of Windows Installer.
According to Windows Installer Team blog, "If you want to check the version of the Windows Installer on your system, check the version of MSI.DLL in the Windows\System32 folder. If the version is 3.1.4000.2435, you have the latest version.
One common point of confusion is that even if you have the latest version of Windows Installer 3.1 on your system and you type in msiexec.exe /? from a command-window, you will still be told that you are on version 3.1.4000.1823 or 3.1.4000.1830. This is because msiexec.exe /? will only give you the version of msiexec on the system -- not the other Windows Installer-related dll's. (The version of msiexec was not updated to 3.1.4000.2435 with the (v2) redistributable, just msi.dll was updated.)"
Luckily, I found a neat .vbs browser hosted script by Michael Harris \(MVP Scripting\). Save the following code as .htm
<html>
<head>
<script language="vbscript">
sub document_onclick()
set installer = createobject("windowsinstaller.installer")
msgbox installer.version
end sub
</script>
</head>
<body>
Click me for Windows Installer version...
</body>
</html>
and you are done:-). Note that the "windowsinstaller.installer" object is not marked safe for scripting in IE browser hosted script... Double click the saved htm file and then you need to click the information bar to allow the blocked ActiveX control in IE
If the machine is configured for automatic updates using WSUS then it will update the installer automatically as mandatory WSUS update :-).
There is some confusion in updating WSUS to SP1 on remote SQL deployments to run with (/F & /B) switches.
According to Bobbie Harder (MSFT):
You do have to run the setup package on both the front-end and back-end server without passing any switches. The steps which have been tested and validated should be:
1) Run the setup package on the front-end with no switches and choose to upgrade.
2) Run the setup package on the back-end with no switches and choose to upgrade.
More information on microsoft.public.windows.server.update_services
There is some confusion in updating WSUS to WSUS SP1 on remote SQL deployments to run with (Front end and Back end) switches.
According to Bobbie Harder (MSFT):
You do have to run the setup package (WSUS SP1) on both the front-end and back-end server without passing any switches. The steps which have been tested and validated should be:
1) Run the setup package on the front-end with no switches and choose to upgrade.
2) Run the setup package on the back-end with no switches and choose to upgrade.
UPDATE 6/13/2006:
3) ALSO, If you have migrated your WSUS server database (WMSDE) to a SQL server (local or remote) you must change the value of the following registry key:
HKLM\Software\Microsoft\Update Services\Server\Setup\WmsdeInstalled, from
"1" to "0" before attempting to upgrade to WSUS SP1.
If you are struggling with installing WSUS SP1 then feel free to post your issues on microsoft.public.windows.server.update_services
SYMPTOMS
After updating WSUS to WSUS SP1... You might see Red X on WSUS Updates Window in WSUSAdmin console and eventually Synchronization fails.
KNOWN ISSUE
Once you upgrade to WSUS SP1, you might want to re-configure Synchronization Options (proxy settings) in WSUSAdmin console as they are lost during the upgrade.
Save the settings and perform a manual sync to download the updates.
WSUS SP1 Build 2.0.0.2620
WSUS RTM Build 2.0.0.2472
To identify if you have installed WSUS SP1;
You can check the version number for the wsusservice.exe file located in %ProgramFiles%\Update Services\service\bin\wsusservice.exe.
OR, check the WSUS Build number from WSUSAdmin home page (bottom of the page - Last line)
WSUS SP1 Build 2.0.0.2620
WSUS RTM Build 2.0.0.2472
Ten Principles of Microsoft Patch Management
By Christopher Budd, Security Program Manager, Microsoft Corporation
1. Service packs should form the foundation of your patch management strategy.
2. Make Product Support Lifecycle a key element in your strategy.
3. Perform risk assessment using the Severity Rating System as a starting point.
4. Use mitigating factors to determine applicability and priority.
5. Only use workarounds in conjunction with deployment.
6. Issues with Security Updates are documented in the Security Bulletin Master Knowledge Base Article.
7. Test updates before deployment.
8. Contact Microsoft Product Support Services if you encounter problems in testing or deployment. An important thing to remember is that Microsoft provides no-charge support for issues related to security updates. You can get in touch with Microsoft for security bulletin support through the Security Support Site at http://support.microsoft.com/securityitpro
9. Use only methods and information recommended for detection and deployment.
10. The Security Bulletin is always authoritative.
You see the following error in %Windir%\WindowsUpdate.log
SYMPTOMS
2006-06-15 17:02:23 2104 83c Misc =========== Logging initialized (build:
5.8.0.2469, tz: -0400) ===========
2006-06-15 17:02:23 2104 83c Misc = Process: C:\WINDOWS\system32\wuauclt.exe
2006-06-15 17:02:23 2104 83c Misc = Module: C:\WINDOWS\system32\wuaueng.dll
2006-06-15 17:02:23 2104 83c DtaStor FATAL: Failed to initialize datastore,
error = 0xC800021F
2006-06-15 17:02:23 2104 83c Misc =========== Logging initialized (build:
5.8.0.2469, tz: -0400) ===========
CAUSE
It looks like the client datastore failed to initialize.
WORKAROUND
1. Open a CMD prompt on the client.
2. Type "net stop wuauserv" (without quotes) <hit enter>.
3. Type "cd %Windir%\SoftwareDistribution".
4. Type "RD /s /q Datastore" (this will remove the client datastore).
5. Type "net start wuauserv" (without quotes) <hit enter> .
6. Type "wuauclt /detectnow" then check %Windir%\WindowsUpdate.log if it is successful.
OR, just stop the Automatic Updates Service and delete "%Windir%\SoftwareDistribution\DataStore" folder and start Automatic Updates Service and force the update detection (wuauclt /detectnow)
Sort by Trending