criffo / getADObjectMEmberOfCustom

Gets memberof attribute recusvely for an active directory object (computer,user,group) LDAP request via .Net classes, namespace System.DirectoryServices for the directory searcher and active dorectory classes, no need to import activedirectory module Allows to include the domain users or computers membership as well It takes by default the forest level but the search can be restricted to domain scope or extended to domain and its trusts, forest and its trusts or explicit domains it returns void in case of no result, and in case of result, a list of object with string attributes for csv export.
6 stars 1 forks source link

POWERSHELL FUNCTIONS TO GET RECURSIVELY AN AD OBJECT GROUPS MEMBERSHIPS

Both function are based on the ldap directory searcher and do not need active directory module

Function: Get-ADObjectMemberOfRecurseByBFS

It is based on a BFS approach by getting member of attributes of object first then groups recusrively The result is a list with defined attributes. A nesting level and partial tree memberof is captured as attributes The initial query is completed by loads of queries depending on the number of domain, forest and trusts Parametter can narrow down or expand the ressearch and explicit domain search can be defined

Function: Get-ADObjectMemberOfRecurseByLDAPInChain

It is based on DB query with the FLAG LDAPINCHAIN- The result is a Resutl Searcher Collection As parameters serie of doamin can be included in the search