IUpdateServer.CreateComputerTargetGroup Method (String, IComputerTargetGroup)
Applies To: Windows Server Update Services
Create a new computer group on the server as a child of the specified target group.
Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
Syntax
IComputerTargetGroup CreateComputerTargetGroup(
string name,
IComputerTargetGroup parentGroup
)
IComputerTargetGroup^ CreateComputerTargetGroup(
String^ name,
IComputerTargetGroup^ parentGroup
)
abstract CreateComputerTargetGroup :
name:string *
parentGroup:IComputerTargetGroup -> IComputerTargetGroup
Function CreateComputerTargetGroup (
name As String,
parentGroup As IComputerTargetGroup
) As IComputerTargetGroup
Parameters
name
Type: System.StringThe name of the target group to create. This name must be a unique name on this server.
parentGroup
Type: Microsoft.UpdateServices.Administration.IComputerTargetGroupThe target group to use as the parent of the new group. If null, the group will be created as a child of the All Computers target group.
Return Value
Type: Microsoft.UpdateServices.Administration.IComputerTargetGroup
Exceptions
Exception
Condition
name is a null reference.
name is an empty string or greater than 256 characters in length.
name contains a character that is not valid.
WsusObjectAlreadyExistsException
A computer group already exists with the requested name.
The specified parent target group could not be found in the DB.
- The server is in replica mode or parentGroup refers to the Unassigned Computers target group.
Remarks
This operation requires WSUS Administrator privileges.
See Also
CreateComputerTargetGroup Overload
IUpdateServer Interface
Microsoft.UpdateServices.Administration Namespace
Return to top