Errors When Using the FEP 2010 Definition Update Automation Tool
by Michael Cureton
We’ve become aware of two issues when using the Definition Update Automation Tool. This blog article presents workarounds for the issues.
Definition Update Automation Tool fails to add new definition updates to the deployment package
Symptoms
The FEP 2010 Definition Update Automation Tool may fail to add new definition updates to your deployment package. Reviewing the %ProgramData%\SoftwareUpdateAutomation.log file shows the following exception:
SmsAdminUISnapIn Error: 1 : Unexpected exception: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Microsoft.Forefront.EndpointProtection.SoftwareUpdateAutomation.SccmUtilities.CalculateCleanupDelta(ConnectionManagerBase connection, ICollection`1 freshUpdateFilesObjectList, IResultObject destinationPackageObject)
at Microsoft.Forefront.EndpointProtection.SoftwareUpdateAutomation.SoftwareUpdater.Update(SoftwareUpdateAutomationArguments arguments)
at Microsoft.Forefront.EndpointProtection.SoftwareUpdateAutomation.SoftwareUpdater.Main(String[] args)
Cause
More than one FEP 2010 definition update is being detected as active by the tool.
More Information
The FEP 2010 Definition Update Automation tool queries WMI (SELECT * FROM SMS_SoftwareUpdate WHERE ArticleID=2461484 AND IsSuperseded=0 AND IsEnabled=1) to get the single active FEP 2010 definition update. The exception happens as a result of more than one update being returned. The tool may detect more than one update as being active when one of the two conditions is TRUE:
- One or more FEP 2010 definition updates has been expired but not superseded, OR
- One or more FEP 2010 definition updates has been orphaned.
To confirm if you’re experiencing condition #1 or #2, run the below WMI query:
SELECT * FROM SMS_SoftwareUpdate WHERE ArticleID=2461484 AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0
If the query only returns one row, then you are experiencing condition #1. If two or more rows are returned, you are experiencing condition #2.
Workarounds
Condition #1
If you are experiencing condition #1, you can prevent the symptom by simply adding the /UpdateFilter flag to the command line for the tool (SoftwareUpdateAutomation.exe) with the appropriate values to filter out expired definition updates that are not superseded.
For example:
SoftwareUpdateAutomation.exe /AssignmentName <AssignmentName> /PackageName <DeploymentPkgName> /UpdateFilter “ArticleID=2461484 AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0”
Condition #2
If you are experiencing condition #2, you will need to manually decline the orphaned updates via the WSUS administration console. For each update returned from the WMI query that you used to confirm that you have condition #2, double-click on the LocalizedDisplayName property and note the definition version. The update with the highest definition version will be the active one. The update(s) with the lower definition versions have been orphaned.
For example, using the list below, 1.107.713.0 would be the active update and the other two updates are orphaned and would need to be declined manually in WSUS.
Definition Update for Microsoft Forefront Endpoint Protection 2010 - KB2461484 (Definition 1.103.1405.0)
Definition Update for Microsoft Forefront Endpoint Protection 2010 - KB2461484 (Definition 1.105.2231.0)
Definition Update for Microsoft Forefront Endpoint Protection 2010 - KB2461484 (Definition 1.107.713.0)
After you have determined the orphaned update(s) title (and version), load the WSUS snap-in and drill down to the Updates node. On the action pane, click New Update View. Select “Updates are in a specific classification” and “Updates are for a specific product”. In step 2, click any classification and ensure that only Definition Updates is checked. Next click any product and ensure that only Forefront Endpoint Protection 2010 is checked. In step 3, specify a name for the view and click OK.
Locate the created view in the WSUS console. Change the Approval value to "Any Except Declined" and the Status to "Any" and hit Refresh. Click the Title column so that the results are sorted using the version. Find the orphaned update(s) that you identified by version and select the Decline action for each. Once this is complete, you’ll need to wait for the next scheduled Software Update Point (SUP) sync to complete, at which time the updates that you declined will be marked as expired in the ConfigMgr database.
NOTE: Running a manual SUP sync will NOT expire the declined updates. Only a scheduled sync will perform this operation.
Once the sync is complete, you can run the WMI query used to determine condition to confirm that only one row is now returned. You will also need to run the tool going forward using the condition #1 workaround with the /UpdateFilter flag.
Definition Update Automation Tool does not refresh distribution points
Symptoms
The FEP 2010 Definition Update Automation Tool does not refresh distribution points (DPs) by default. Even though the help output for the tool states that /RefreshDP is set by default, it is not.
Workarounds
Add /RefreshDP to the command line for the tool (SoftwareUpdateAutomation.exe). For example:
SoftwareUpdateAutomation.exe /AssignmentName <AssignmentName> /PackageName <DeploymentPkgName> /RefreshDP
Comments
Anonymous
January 01, 2003
Thanks for the heads up Torsten! In our testing, the single quotes around the article ID number did not change the functionality of the query. It’s good to know, however, that if for some reason the query is not working, try using the single quotes.Anonymous
January 01, 2003
Thanks for your question Mike! In order to determine what’s happening in your environment, our support folks would need to see logs and other information. For this issue, it’s best to call into support using one of the options listed on this page:support.microsoft.com/.../default.aspx Thanks!Anonymous
July 19, 2011
I just stumbled accross a similar error, but the article did not help me. It pointed me to the right direction though. Querying WMI using "SELECT * FROM SMS_SoftwareUpdate WHERE ArticleID=2461484 AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0" failed (even when using CIM Studio or vbs) and the error returned was "Error waiting for query to return" or 0x80041001. To make a long story short: I changed the query to "SELECT * FROM SMS_SoftwareUpdate WHERE ArticleID='2461484' AND IsSuperseded=0 AND IsEnabled=1 AND IsExpired=0" and it started working (using the /UpdateFilter parameter).Anonymous
July 20, 2011
Myself and another user are seeing this, where SCUP updates cause a failure, this is from the automation tool log SQLMessage = "[22018][245][Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed when converting the varchar value 'APBS10-17' to data type int.";