Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $login = "conio"
- $domain = "LDAP://ildap.dbs.fr:389/OU=people,DC=dbs,DC=FR"
- $Filter = "(&(objectClass=*)(login=$login))"
- $Entry = New-Object System.DirectoryServices.DirectoryEntry($domain,$null,$null,'FastBind')
- $Searcher = New-Object System.DirectoryServices.DirectorySearcher($Entry,$Filter)
- $Result = $Searcher.FindOne()
- $Result.Properties.mail
- #Get list of ldap fields :
- #$list = $Result.Properties
- #$list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement