Exchange 2013 Powershell Help

Platform: Exchange 2013 Powershell


I would like to use Exchange Powershell to give me a list of all people that have ActiveSync enabled and include their email addresses and can't seem to figure it out.  I have everything but the email addresses.  Here is the following command I am using:
Get-CASMailbox -ResultSize Unlimited | where { $_.ActiveSyncEnabled -eq 'True'} | ft name, activesyncenabled -autosize > c:\ActiveSyncEnabled.txt

What am I missing exactly?

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.

Todd NelsonSystems EngineerCommented:
It's always best to run the simplest versions of a command first, and with output of format-list ("fl") to review the parameters. Like so...

Get-CASMailbox | fl

Open in new window

I prefer CSV output because it is easier to manipulate.  Based on what you are looking for, give this command a try...

Get-CASMailbox -ResultSize Unlimited | where { $_.ActiveSyncEnabled -eq "True" } | select Name,PrimarySmtpAddress,ActiveSyncEnabled | Export-Csv C:\ActiveSyncEnabled.csv -NoTypeInformation

Open in new window

However, if you just want to expand on your command, this should do it...

Get-CASMailbox -ResultSize Unlimited | where { $_.ActiveSyncEnabled -eq 'True'} | ft name, activesyncenabled,PrimarySmtpAddress -autosize > c:\ActiveSyncEnabled.txt

Open in new window


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
zito2000Author Commented:
Thank you so much for your prompt response.
The first command made it a million times cleaner.  Much rather it be in a CSV format.

Thanks again!
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.