ADObjectId.ToGuidOrDNString method
Returns the GUID or distinguished name of the Active Directory object.
Namespace: Microsoft.Exchange.Data.Directory
Assembly: Microsoft.Exchange.Data.Directory (in Microsoft.Exchange.Data.Directory.dll)
Syntax
'Declaration
Public Function ToGuidOrDNString As String
'Usage
Dim instance As ADObjectId
Dim returnValue As String
returnValue = instance.ToGuidOrDNString()
public string ToGuidOrDNString()
Return value
Type: System.String
The GUID or distinguished name of the Active Directory object.
Remarks
The ToGuidOrDNString() method returns the GUID or distinguished name as follows:
If the ObjectGuid property is not empty, the ObjectGuid property is returned as a string.
If the ObjectGuid property is empty and the DistinguishedName property is not empty, the DistinguishedName property is returned as a string.
If both the ObjectGuid property and the DistinguishedName property are empty, an empty string is returned.