Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the Active Directory path to the root of the specified Group Policy object (GPO) section.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management.Interop (in Microsoft.GroupPolicy.Management.Interop.dll)
Syntax
public string GetDSPath(
GpoSection section
)
public:
String^ GetDSPath(
GpoSection section
)
member GetDSPath :
section:GpoSection -> string
Public Function GetDSPath (
section As GpoSection
) As String
Parameters
section
Type: Microsoft.GroupPolicy.GpoSectionOne of the GpoSection enumeration values that specifies the GPO section.
Return Value
Type: System.String
Returns String. The path in ADSI format (LDAP://cn=user, ou=users, dc=coname, dc=com).
Exceptions
| Exception | Condition |
|---|---|
| ObjectDisposedException | The GroupPolicyObject is disposed. |
Remarks
If you call the GetDSPath method and specify a computer GPO, the method returns an empty string (“”). This is because computer GPOs do not have Active Directory storage; they have only file system storage.
To retrieve the file system path to the root of a GPO section, you can call the GetFileSystemPath method.
See Also
GroupPolicyObject Class
Microsoft.GroupPolicy Namespace
Return to top