Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

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

Posted (edited)

Get-ADuser -filter {(surname -notlike "*") -and (givenname -notlike "*")}

 

That should work.

 

EDIT: Davit's is way better, use his.

Edited by madurham
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...