LDAP Server starten und prüfen: __________________________________________________________________________________________ dsamain.exe -dbpath C:\Users\Nutzer1\Desktop\ntds.dit -ldapport 50005 -allowNonAdminAccess ldp.exe 127.0.0.1:50005 Script Teil1: __________________________________________________________________________________________ $DN = ([adsi]"LDAP://localhost:50005").distinguishedName; $DomainObj = New-Object System.DirectoryServices.DirectoryEntry("LDAP://localhost:50005/$DN"); $objSearcher = New-Object System.DirectoryServices.DirectorySearcher -ArgumentList $DomainObj; $ObjSearcher.PageSize = $PageSize; $objSearcher.SizeLimit = 10000; $ObjSearcher.Filter = '(objectCategory=user)' $Users = $ObjSearcher.FindAll(); $ObjSearcher.Filter = '(objectCategory=group)' $Groups = $ObjSearcher.FindAll(); $ObjSearcher.Filter = '(objectCategory=computer)' $Computers = $ObjSearcher.FindAll(); $ObjSearcher.dispose(); Script Teil 2: __________________________________________________________________________________________ $Users.properties[0] $Groups.properties[0] $Computers.properties[0] Fortgeschrittene: __________________________________________________________________________________________ $Users | Select -ExpandProperty Properties | Select @{n='DisplayName';e={$_.name}},@{n='Beschreibung';e={$_.description}}, @{n='WhenChanged';e={$_.whenchanged}}| Out-GridView; $Computers | Select -ExpandProperty Properties | Select @{n='DisplayName';e={$_.name}}, @{n='OS';e={$_.operatingsystem}}| Out-GridView;