ComputerTargetGroupCollection.Add Method (IComputerTargetGroup)
Applies To: Windows Server Update Services
Adds an existing ComputerTargetGroup to the end of the ComputerTargetGroupCollection.
Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
Syntax
public int Add(
IComputerTargetGroup value
)
public:
int Add(
IComputerTargetGroup^ value
)
member Add :
value:IComputerTargetGroup -> int
Public Function Add (
value As IComputerTargetGroup
) As Integer
Parameters
value
Type: Microsoft.UpdateServices.Administration.IComputerTargetGroupThe IComputerTargetGroup to add to the end of the collection.
Return Value
Type: System.Int32
The zero-based index at which the target group was added to the collection.
Exceptions
Exception
Condition
The target group already exists in the collection.
value is a null reference (Nothing in Visual Basic).
Remarks
You can use this method to build a specific target group collection to pass to SetComputerTargetGroups.
To create a target group, call CreateComputerTargetGroup.
See Also
Add Overload
ComputerTargetGroupCollection Class
Microsoft.UpdateServices.Administration Namespace
Return to top