如何使用c#确定已删除的活动目录对象的类型(用户或组)

时间:2016-10-07 06:29:40

标签: c# active-directory directoryservices

根据How to determine the type (AD User vs. AD Group) of an account? objectCategory 属性用于确定对象是组还是用户。 但删除对象时会删除objectCategory属性。 确定已删除对象类型的可能方法是什么?

可以为已删除的用户

检索以下属性
         objectclass           : top
         objectclass           : person
         objectclass           : organizationalPerson
         objectclass           : user
 msexchmailboxsecuritydescriptor : System.Byte[]
 usnchanged                 : 1577314
 whencreated                : 26/09/2016 06:40:18
 name                           : gonzalo.pierson
DEL:ff11111f-a730-433f-a03e-2e222da622e2
 whenchanged               : 06/10/2016 05:37:17
 objectsid                      : System.Byte[]
 msexchprevioushomemdb     : CN=Mailbox Database,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=abcdomain2,DC=local
 useraccountcontrol             : 544
 msexchhomeservername     : /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=abcdomainSERVER
 adspath                    : LDAP://CN=gonzalo.pierson\0ADEL:ff11111f-a730-433f-a03e-2e222da622e2,CN=Deleted Objects,DC=abcdomain2,DC=local
 isdeleted                 : True
         proxyaddresses        : smtp:alias1.gonzalo@abcdomain.com
         proxyaddresses        : SMTP:gonzalo.pierson.abcdomain@abcdomain.com
 cn                             : gonzalo.pierson
DEL:ff11111f-a730-433f-a03e-2e222da622e2
 usncreated                 : 1565752
 legacyexchangedn        : /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=gonzalo.pierson176
 distinguishedname          : CN=gonzalo.pierson\0ADEL:ff11111f-a730-433f-a03e-2e222da622e2,CN=Deleted Objects,DC=abcdomain2,DC=local
 msexchversion             : 44220983382016
 lastknownparent            : OU=Accounts,OU=Southern Region,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=abcdomain2,DC=local
 isrecycled                     : True
 msexchmailboxguid      : System.Byte[]
 msexchuseraccountcontrol  : 0
 instancetype               : 4
 samaccountname         : gonzalo.pierson
 objectguid                 : System.Byte[]

0 个答案:

没有答案