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.StringThe display name for the new GPO.
starterGpo
Type: Microsoft.GroupPolicy.StarterGpoA StarterGpo object that represents the Starter GPO to use to create the new GPO. The Starter GPO must exist for this method to succeed.
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