Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export ENABLED users+email

Status
Not open for further replies.

intel233

MIS
Feb 24, 2007
289
US
I am trying to export all enabled users with email addresses. What I want is FirstName, LastName, Email. I tried:
Get-ADUser -Filter ‘enabled -eq $true’ -Properites EmailAddress | select givenname, Surname, emailaddress | export-csv c:\users\users.csv

The issue is when I try to filter on the column heading in Excel it doesnt work. Not sure why. Is there something else I can try?


When I needed just a list of users I ran:
Get-User -ResultSize Unlimited | select FirstName,LastName,Displayname,Phone,title,Company,Department,Office | export-csv c:\users\contacts.csv and with that I can filter the columns. But I dont know how to add Email addresses to this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top