Like Us
Plus One
Follow Us
Search
 Author Jeff Jones  Views 468 View Original Article

There are multiple good PowerShell options to query an Active Directory user object.   Below are three code snippets which all locate an AD user.   Cheers! Option 1- Get-ADUser Login Get-ADUser jsmith -Properties *   Option 2- Get-ADUser Filter Get-ADUser -Filter {Surname -like 'W*'} -Properties *   Option 3 – LDAP Directory Searcher $strFilter = "(&(objectCategory=User)(samAccountName=jsmith))" $objDomain = New-Object System.DirectoryServices.Dir…
View Original Article

Recent Articles from @SPJeff