GPDomain.CreateGpo Method (String, StarterGpo)

 

Creates a new Group Policy object (GPO) from the specified Starter GPO with the specified display name in the domain.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Syntax

public Gpo CreateGpo(
    string gpoDisplayName,
    StarterGpo starterGpo
)
public:
Gpo^ CreateGpo(
    String^ gpoDisplayName,
    StarterGpo^ starterGpo
)
member CreateGpo : 
        gpoDisplayName:string *
        starterGpo:StarterGpo -> Gpo
Public Function CreateGpo (
    gpoDisplayName As String,
    starterGpo As StarterGpo
) As Gpo

Parameters

  • gpoDisplayName
    Type: System.String

    The display name for the new GPO.

Return Value

Type: Microsoft.GroupPolicy.Gpo

Returns Gpo. The new GPO.

Exceptions

Exception Condition
ArgumentException

gpoDisplayName is an empty string (“”).

ArgumentNullException

The gpoDisplayName parameter or the starterGpo parameter is null.

Remarks

The specified Starter GPO must exist.

See Also

StarterGpo
CreateGpo Overload
GPDomain Class
Microsoft.GroupPolicy Namespace

Return to top