If it helps any, I usually use this, probably not very elegant but seems to do what I need:
$Mailboxes = Get-Mailbox $Mailboxes | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | Select Identity,DeviceType,DeviceUserAgent,DeviceID,LastSyncAttemptTime,LastSuccessSync | Export-CSV -Path C:\temp\activesync.csv From: Dan Hyatt [mailto:d...@danhyatt.com] Sent: 17 January 2012 17:03 To: MS-Exchange Admin Issues Subject: RE: ActiveSync Inventory Hey Michael, I am trying to export this to a csv and am having a little trouble. I know its the export-csv command but not having much luck. What do you suggest? ________________________________ From: mich...@smithcons.com<mailto:mich...@smithcons.com> To: exchangelist@lyris.sunbelt-software.com<mailto:exchangelist@lyris.sunbelt-software.com> Subject: RE: ActiveSync Inventory Date: Sun, 15 Jan 2012 22:52:29 +0000 Thought I'd sent this on Friday, but apparently not: $allResults = Get-Mailbox -ResultSize Unlimited foreach( $mailbox in $allResults ) { Get-ActiveSyncDeviceStatistics -Mailbox $mailbox.Identity | select @{ n = "UserprincipalName"; e = { $mailbox.UserPrincipalName } }, DeviceFriendlyName, Devicetype, DeviceUserAgent, Identity } $allResults = $null Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Dan Hyatt [mailto:d...@danhyatt.com]<mailto:[mailto:d...@danhyatt.com]> Sent: Friday, January 13, 2012 12:28 PM To: MS-Exchange Admin Issues Subject: RE: ActiveSync Inventory Hi Jim, Yes it works... Just need the UPN. We are on Exchange 2007. ________________________________ From: jimruppre...@ku.edu<mailto:jimruppre...@ku.edu> To: exchangelist@lyris.sunbelt-software.com<mailto:exchangelist@lyris.sunbelt-software.com> Subject: RE: ActiveSync Inventory Date: Fri, 13 Jan 2012 17:21:29 +0000 I don't have an answer to your question, but I'm wondering if this script actually runs for you? It throws an error for me. "Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently. + CategoryInfo : OperationStopped: (Microsoft.Power...tHelperRunspace:ExecutionCmdletHelperRunspace) [], PSInvalidOperationException + FullyQualifiedErrorId : RemotePipelineExecutionFailed" -jim From: Dan Hyatt [mailto:d...@danhyatt.com]<mailto:[mailto:d...@danhyatt.com]> Sent: Friday, January 13, 2012 10:35 AM To: MS-Exchange Admin Issues Subject: ActiveSync Inventory Hey guys, I am trying to export a list that would include the following ActiveSync Device attributes. DisplayName, Login, SMTP Address, Devicetype. I found this script which has everything I need except for the userlogin. Get-Mailbox | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | fl DeviceFriendlyName, Devicetype, DeviceUserAgent, Identity How would I best also return that data? Thanks, Daniel --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com> with the body: unsubscribe exchangelist -- MIRA Ltd Watling Street, Nuneaton, Warwickshire, CV10 0TU, England Registered in England and Wales No. 402570 VAT Registration GB 100 1464 84 The contents of this e-mail are confidential and are solely for the use of the intended recipient. If you receive this e-mail in error, please delete it and notify us either by e-mail, telephone or fax. You should not copy, forward or otherwise disclose the content of the e-mail as this is prohibited. --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe exchangelist