我如何使用主体在 c# 中获取 AD 计算机帐户 DN
public string GetcomputerExtededProperty(string fieldName)
{
try
{
ComputerPrincipal oGroupPrincipal = GetComputer();
return GetProperty((DirectoryEntry)oGroupPrincipal.GetUnderlyingObject(), fieldName);
}
catch
{
return "";
}
}