GPDomain.GetGpo Method (String)

 

Retrieves the Group Policy object (GPO) with the specified display name from the domain.

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

Syntax

public Gpo GetGpo(
    string gpoDisplayName
)
public:
Gpo^ GetGpo(
    String^ gpoDisplayName
)
member GetGpo : 
        gpoDisplayName:string -> Gpo
Public Function GetGpo (
    gpoDisplayName As String
) As Gpo

Parameters

  • gpoDisplayName
    Type: System.String

    The display name of the GPO to retrieve.

Return Value

Type: Microsoft.GroupPolicy.Gpo

Returns Gpo. The GPO.

Exceptions

Exception Condition
ArgumentException

The GPO is not found.

MultipleGroupPolicyObjectsFoundException

Multiple GPOs that have the same display name exist in the domain. For more information, see the "Remarks".

Remarks

If the GPO that you want has a display name that is not unique within this domain, you can use GetGpo.

See Also

GetGpo Overload
GPDomain Class
Microsoft.GroupPolicy Namespace

Return to top