ISubscription.SetUpdateCategories(UpdateCategoryCollection)

Specifies the categories of updates that you want the WSUS server to synchronize.

public void SetUpdateCategories(
  UpdateCategoryCollection categories
);
Public Sub SetUpdateCategories( _
  ByVal categories As UpdateCategoryCollection _
)
Implements ISubscription.SetUpdateCategories

Parameters

Return Values

This method has no return values.

Exceptions

Exception type Condition
System.ArgumentNullException categories cannot be null.

Remarks

To use the specified categories in the synchronization process, you must call ISubscription.Save.

Note that the categories of a downstream server are determined by the upstream server; WSUS ignores the categories that you specify on a downstream server (when IUpdateServerConfiguration.SyncFromMicrosoftUpdate is false).

You should not include related parent-child categories in the collection. For example, you should not include the Windows product family category and the Windows XP family product in the same collection. However, you can specify the Office product family category and the Windows XP family product category in the same collection because they are not related. If the collection contains related parent-child categories, WSUS ignores the child categories and synchronizes all the products for the parent category. For example, if the collection includes both the Windows product family category and the Windows XP family product category, WSUS ignores the Windows XP family product category and synchronizes all the Windows products.

If the collection contains a company category, all the products for that company are synchronized. If the collection contains a product family category, all products for that product family are synchronized. If the collection contains a company category or a product family category, all new products for the company or product family are automatically included in the list of products to synchronize.

If you want to control the products that WSUS synchronizes, include only those products that you want to synchronize in the collection (do not include the company or product family categories).

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.
Namespace

Defined in Microsoft.UpdateServices.Administration.

Assembly

Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.

See Also

ISubscription.GetUpdateCategories, IUpdateServer.GetRootUpdateCategories, IUpdateServer.GetUpdateCategories