HasActiveSyncDevicePartnership
(1)
CASMailbox
(1)
DistinguisheDName
(1)
DisplayName
(1)
ResultSize
(1)
NoType
(1)
Identity
(1)
Guys
(1)

Script to export list of users with activesunc enabled on

Asked By Andrew Story
08-Mar-10 10:39 AM
Hi Guys,

I am trying to find a way to export a list of users who have active sync
enabled only.

I am running the below but it shows me all users and isn;t very friendly when
exported to CSV - I canlt seem to sort the data to make sense of it:

Get-CASMailbox -ResultSize Unlimited |Format-List ActiveSyncEnabled,
Identity >"C:\temp\eas.csv"

I also try to run the below but it won;t run, I am guessing it;s down the the
$true entry:

Get-CASMailbox -ResultSize Unlimited |Format-List ActiveSyncEnabled $True,
Identity >"C:\temp\eas.csv"

Would anyone be able to pint me in the right direction please to retrieve
this information from exchange?

Give this a try:Get-CASMailbox -ResultSize Unlimited | ?

Mike Pfeiffer replied to Andrew Story
08-Mar-10 12:49 PM
Give this a try:

Get-CASMailbox -ResultSize Unlimited | ?{$_.ActiveSyncEnabled} | Select
DisplayName,ActiveSyncEnabled | Export-Csv c:\eas.csv -NoType

that is all on one line, so watch out for text wrap

Hello Andrew,Identity>> "C:\temp\eas.csv"Identity>>Identity>>C:\temp\eas.

Karl Mitschke replied to Andrew Story
08-Mar-10 04:56 PM
Hello Andrew,

Identity>> "C:\temp\eas.csv"
Identity>>
Identity>>C:\temp\eas.csv
Identity>>

Try this one liner:

Get-CASMailbox -ResultSize Unlimited -Filter{(HasActiveSyncDevicePartnership
-eq $true) -AND (name -notlike "cas*")}| select name, servername, DistinguisheDName,
ActiveSyncMailboxPolicy |Export-Csv C:\temp\eas.csv -NoTypeInformation


Karl
http://unlockpowershell.wordpress.com/

Thanks for your input guys.

Andrew Story replied to Andrew Story
09-Mar-10 03:22 AM
Thanks for your input guys.
Post Question To EggHeadCafe