Compartir a través de


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.String

    The name of the target group to create. This name must be a unique name on this server.

Return Value

Type: Microsoft.UpdateServices.Administration.IComputerTargetGroup

IComputerTargetGroup.

Exceptions

Exception

Condition

ArgumentNullException

name is a null reference.

ArgumentOutOfRangeException

name is an empty string or greater than 256 characters in length.

ArgumentException

name contains a character that is not valid.

WsusObjectAlreadyExistsException

A computer group already exists with the requested name.

WsusObjectNotFoundException

The specified parent target group could not be found in the DB.

InvalidOperationException

  • 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