Edu-IT Posted May 1, 2014 Posted May 1, 2014 Anyone help me out with a way to find users in AD with no First Name or Last Name?
Davit2005 Posted May 1, 2014 Posted May 1, 2014 Give This a try, modify the output path to a suitable location. GET-ADUser -Properties sAMAccountName -Filter {givenName -notlike "*" -and Surname -notlike "*"} | Select-Object -Property sAMAccountName | Export-Csv 'c:\Details.csv' -NoTypeInformation
madurham Posted May 1, 2014 Posted May 1, 2014 (edited) Get-ADuser -filter {(surname -notlike "*") -and (givenname -notlike "*")} That should work. EDIT: Davit's is way better, use his. Edited May 1, 2014 by madurham 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now