Created
March 16, 2015 09:25
-
-
Save poizan42/0664f2401c551f8c6032 to your computer and use it in GitHub Desktop.
Get all AD group members (> 1500)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$listObj = [ADSI]"LDAP://CN=DistList,CN=Users,DC=example,DC=com" | |
$tmpMembers = $listObj.PSBase.Invoke('Members') | %{([System.DirectoryServices.DirectoryEntry] $_).mail} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment