Exchange command for some attributes

Is there a command that will get me all these attributes ?
First, last name, displayname, primary email address, UPN ,samaccountname,all others smtp address ,OU and status ( disabled or enabled)
Thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Schnell SolutionsSystems Infrastructure EngineerCommented:
Get-ADUser -Filter * -Property * | Select-Object -Property GivenName,SureName,DisplayName,EmailAddress,UserPrincipalName,SamAccountName,ProxyAddresses,DistinguishedName,Enabled
landfemailAuthor Commented:
and is it possible to put in excel ?
Schnell SolutionsSystems Infrastructure EngineerCommented:
Yeap, we can save on your desktop like this...

Get-ADUser -Filter * -Property * | Select-Object -Property GivenName,SureName,DisplayName,EmailAddress,UserPrincipalName,SamAccountName,ProxyAddresses,DistinguishedName,Enabled | Export-Csv -Path $Home\Desktop\MyUsers.csv
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

landfemailAuthor Commented:
proxy addresses gives me all information, is there another command for showing smtp addresses
landfemailAuthor Commented:
Thank you but when i put it in cvs or txt file "surname" and "proxy addresses" shows as : Microsoft.ActiveDirectory.Management.ADPropertyValueCollection and no data on them.
Jeff GloverSr. Systems AdministratorCommented:
There is a VBScript I use to pull attributes from AD and put them into an Excel file. The excel file opens on your desktop and populates it automatically. (just minimize it while it runs. This version was modified to add UserPrincipalName and User Account Control to it (UAC of 512 is active, 514 is disabled. there are a few others) To give credit properly, I got the original script from Spiceworks

I used this site to get the attributes to modify the file.

Hope it helps. Just rename the file to adusers.vbs and click it to run.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeff GloverSr. Systems AdministratorCommented:
Oops. Small typo in the Script copy. Use this one instead
landfemailAuthor Commented:
Great script. thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.