Show Nested memberof When you you have Hide members on Distribution list

July 15, 2018

no comments

Hi

When you have exchange Distribution list that the Members Remark As “hide” , you can list the member of the Distribution list from Active Directory :

$searcher = New-Object System.DirectoryServices.DirectorySearcher
$objdomain = New-Object System.DirectoryServices.DirectoryEntry
$searcher.SearchRoot= $objdomain
$searcher.Filter=”(&(objectClass=Person)(objectCategory=User)(memberOf:1.2.840.113556.1.4.1941:=groupDN))”
$searcher.pagesize=1000
$col=$searcher.FindAll()
[array]$result=$null
foreach ($user in $col)
{
$user.Properties.samaccountname
}

Sagi U. & SHMUEL H.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*