Exchange 2013 Powershell Help

Platform: Exchange 2013 Powershell

Hello,

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!
zito2000Asked:
Who is Participating?
 
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

1
 
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!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.