Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Export to CSV report of AD users

$
0
0

I need to export a list of Active Directory users based on their COMPANY with the following information:

FirstName (sn)
LastName (givenName)
Email (mail)
Position (title)
Department (department)
PhoneNumber (telephoneNumber)
Site (physicalDeliveryOfficeName)

I need it to be in this order by column and there needs to be a header with those name fields instead of the AD attribute.  So the output would look like this:

FirstNameLastNameEmailPositionDepartmentPhoneNumberSite
TestUserstesting123@nowhere.comPayroll ClerkAccounting555-5555District Office

I created a simple CSVDE script to pull the info, but it doesn't change the attribute header.  So for example, my report header says "sn" above the person's FirstName.  Is there a PowerShell script to do this?  Thanks for any help you can provide.


Viewing all articles
Browse latest Browse all 15028

Trending Articles