I would like to get ActiveSync report for all users in organization along with ActiveSync policies assinged to those users. Since Get-ActiveSyncDeviceStatistics does not provide details about AS policy applied to users, had to user Get-CasMailbox.
How do i combine these results in one CSV file? I had done the following but it did not gave me the results as expected.
$mailboxes =Get-Mailbox –ResultSize unlimited
$Result = foreach ($mailbox in $mailboxes) { Get-ActiveSyncDeviceStatistics -Mailbox $mailbox}
$Results += foreach ($mailbox in $mailboxes) { Get-CasMailbox -Identity $mailbox | select Name, ActiveSyncMailboxPolicy}
$Results | Export-CSV c:\results.csv -NoTypeInformation
When we checked exported CSV it contains only data from first command of Get-ActiveSyncDeviceStatistics and no data from second.
Can you please let me know how do we combine these two results in CSV using Powershell?
Do let me know for any additional information since i am new here.