I'm trying to export all users in our AD structure using powershell. I don't want to export the student OU (I work for a school district). I only need to export their name (either using displayName or sn and givenName attributes)
I want to export this to a CSV file. I've attached my attempts, the second one didn't throw any errors but didn't produce any output either.
The examples in the attachments were from an internet search but since neither of these helped, I'm reaching out to the experts that usually get me on the right track.
I'm relatively OK with powershell but the syntax usually chokes me up. I was using powershell mostly for Exchange so switching to AD gives a little bit of a new learning curve.
As always, thanks