AdFind Utility

AdFind ist ein mächtiges Utilty von Joe Ware mit dem Objekte im AD ausgelesen werden können. Es hat sich zu einem Standard-Tool für Active Directory Administratoren entwickelt. Ausgestattet mit einem umfangreichen Parameter-Satz lassen sich gezielt bestimmte Werte oder Attribute einzelner oder mehreren Objekten ermitteln.

Kürzlich gelöschte Objekte im AD:

[PS] C:\orgfiles\AdFind>.\AdFind -default -rb "CN=Deleted Objects" -showdel
AdFind V01.57.00cpp Joe Richards (suppordomaint@joeware.net) November 2021

Using server: DC-2.DOMAIN.local:389
Directory: Windows Server 2016
Base DN: CN=Deleted Objects,DC=DOMAIN,DC=local

dn:CN=Deleted Objects,DC=DOMAIN,DC=local
>objectClass: top
>objectClass: container
>cn: Deleted Objects
>description: Default container for deleted objects
>distinguishedName: CN=Deleted Objects,DC=DOMAIN,DC=local
>instanceType: 4
>whenCreated: 20041214101828.0Z
>whenChanged: 20200204114341.0Z
>uSNCreated: 18478
>isDeleted: TRUE
>uSNChanged: 18478
>showInAdvancedViewOnly: TRUE
>name: Deleted Objects
>objectguid: {B592515C-B591-4C52-90C4-7FE458FC20F4}
>systemFlags: -1946157056
>objectCategory: CN=Container,CN=Schema,CN=Configuration,DC=DOMAIN,DC=local
>isCriticalSystemObject: TRUE
>dSCorePropagationData: 16010101000000.0Z

dn:CN=\0ADEL:02440417-d177-46e7-8003-2e28f3e43d41,CN=Deleted Objects,DC=DOMAIN,DC=local
>objectClass: top
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
>cn: dude\0ADEL:02440417-d177-46e7-8003-2e28f3e43d41
>distinguishedName: CN=dude\0ADEL:02440417-d177-46e7-8003-2e28f3e43d41,CN=Deleted Objects,DC=DOMAIN,DC=local
>instanceType: 4
>whenCreated: 20220523100636.0Z
>whenChanged: 20220824082721.0Z
>uSNCreated: 8395230
>isDeleted: TRUE
>uSNChanged: 9138235
>proxyAddresses: smtp:dude@DOMAIN.local
>proxyAddresses: SMTP:dude@domain.de
>proxyAddresses: X400:C=DE;A= ;P=Mail-domain;O=Exchange;S=dude;
>name: dude\0ADEL:02440417-d177-46e7-8003-2e28f3e43d41
>objectguid: {02440417-D177-46E7-8003-2E28F3E43D41}
>userAccountControl: 66048
>objectsid: S-1-5-21-873888364-1138832615-1381041710-8485
>sAMAccountName: dude
>legacyExchangeDN: /o=Mail-domain/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=46836e06315c4cafba651de8cffa3a1c-dude
>lastKnownParent: OU=_Verwaltung,OU=intern,OU=Users_dh,DC=DOMAIN,DC=local
>isRecycled: TRUE
>msExchHomeServerName: /o=Mail-domain/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=UNIVERSE-6
>msExchMailboxSecurityDescriptor: {Security Descriptor}
>msExchUserAccountControl: 0
>msexchmailboxguid: {1A8152DC-57AF-43F3-B2D5-51EBF99D59BD}
>msExchPreviousHomeMDB: CN=VWL2,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Mail-domain,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=DOMAIN,DC=local
>msExchVersion: 88218628259840

dn:CN=distgroup\0ADEL:5215a432-aa31-478d-bc29-1e78f311d4c9,CN=Deleted Objects,DC=DOMAIN,DC=local
>objectClass: top
>objectClass: group
>cn: distgroup\0ADEL:5215a432-aa31-478d-bc29-1e78f311d4c9
>distinguishedName: CN=distgroup\0ADEL:5215a432-aa31-478d-bc29-1e78f311d4c9,CN=Deleted Objects,DC=DOMAIN,DC=local
>instanceType: 4
>whenCreated: 20051202153001.0Z
>whenChanged: 20220712143450.0Z
>uSNCreated: 30154
>isDeleted: TRUE
>uSNChanged: 8806434
>proxyAddresses: X400:C=DE;A= ;P=Mail-domain;O=Exchange;S=service2;
>proxyAddresses: x400:C=DE;A= ;P=Mail-domain;O=Exchange;S=ka?service;
>proxyAddresses: SMTP:service@domain.de
>proxyAddresses: smtp:distgroup@domain.de
>proxyAddresses: smtp:service2@domain.local
>proxyAddresses: smtp:distgroup@domain.local
>name: distgroup\0ADEL:5215a432-aa31-478d-bc29-1e78f311d4c9
>objectguid: {5215A432-AA31-478D-BC29-1E78F311D4C9}
>objectsid: S-1-5-21-873888364-1138832615-1381041710-5543
>sAMAccountName: distgroup
>legacyExchangeDN: /o=Mail-domain/ou=Erste administrative Gruppe/cn=Recipients/cn=distgroup
>groupType: 8
>lastKnownParent: OU=Weiterleitungen_domain.de,DC=DOMAIN,DC=local
>isRecycled: TRUE
>msExchVersion: 44220983382016



3 Objects returned

In der Ausgabe sehen wir zwei gelöschte Objekte. Ein Benutzerobjekt dude und eine Verteilergruppe distgroup. Das Datum der Löschung zB 20220712143450.0Z (12.07.2022; 14:34:50 GMT) und weitere Attribute der Objekte.

Sie können die Ausgabe auf bestimmte Attribute einschränken, in dem Sie einfach die Attributnamen an das Kommando anfügen!

[PS] C:\orgfiles\AdFind>.\AdFind -default -rb "CN=Deleted Objects" -showdel samaccountname whenChanged objectclass
[PS] C:\orgfiles\AdFind>.\AdFind -default -rb "CN=Deleted Objects" -showdel samaccountname whenChanged objectclass

AdFind V01.57.00cpp Joe Richards (support@joeware.net) November 2021

Using server: GALAXY-6.KASTNER.local:389
Directory: Windows Server 2016
Base DN: CN=Deleted Objects,DC=DOMAIN,DC=local

dn:CN=Deleted Objects,DC=KASTNER,DC=local
>objectClass: top
>objectClass: container
>whenChanged: 20200204114341.0Z

dn:CN=\0ADEL:02440417-d177-46e7-8003-2e28f3e43d41,CN=Deleted Objects,DC=DOMAIN,DC=local
>objectClass: top
>objectClass: person
>objectClass: organizationalPerson
>objectClass: user
>whenChanged: 20220824082721.0Z
>sAMAccountName: dude

dn:CN=distgroup\0ADEL:5215a432-aa31-478d-bc29-1e78f311d4c9,CN=Deleted Objects,DC=DOMAIN,DC=local
>objectClass: top
>objectClass: group
>whenChanged: 20220712143450.0Z
>sAMAccountName: distgroup


3 Objects returned

Universal Distribution Groups (8):

Folgendes Kommando listet alle universellen Verteilergruppen (grouptype:OR:=8) in der angegebenen Domäne auf:

 [PS] C:\orgfiles\AdFind>.\AdFind -b "DC=domain,DC=local" -s subtree -bit -f "(&(objectcategory=group)(sAMAccountType=268435457)(grouptype:OR:=8))" 1.1
AdFind V01.57.00cpp Joe Richards (support@joeware.net) November 2021

Transformed Filter: (&(objectcategory=group)(sAMAccountType=268435457)(grouptype:1.2.840.113556.1.4.804:=8))
Using server: DC-1.DOMAIN.local:389
Directory: Windows Server 2016

dn:CN=Foo,OU=IT,DC=DOMAIN,DC=local

dn:CN=Bar,OU=IT,DC=KASTNER,DC=local

2 Objects returned

Verfügbare Gruppentypen:

2: Global Distribution Group
4: Domain Local Distribution Group
8: Universal Distribution Group

Ein sAMAccountType ist im Globalen Katalog GC ein Attribut, um ein Benutzerobjekt eindeutig zu definieren.

Verfügbare sSAMAccountTypes:

 268435456 SAM_GROUP_OBJECT
 268435457 SAM_NON_SECURITY_GROUP_OBJECT
 536870912 SAM_ALIAS_OBJECT
 536870913 SAM_NON_SECURITY_ALIAS_OBJECT
 805306368 SAM_NORMAL_USER_ACCOUNT
 805306369 SAM_MACHINE_ACCOUNT
 805306370 SAM_TRUST_ACCOUNT
1073741824 SAM_APP_BASIC_GROUP
1073741825 SAM_APP_QUERY_GROUP
2147483647 SAM_ACCOUNT_TYPE_MAX

Loading

Updated on 9. Februar 2023
Was this article helpful?

Related Articles