Good morning Folks (Friday is here!!!)
Yesterday we went over the end-user perspective to retrieve logs from ActiveSync devices. In Today’s post we are going over the same process but doing on the server side where we don’t want to bother users to connect on their OWA or even access their account (using Full Access permission) to perform such tasks.
The first task is to list all ActiveSync devices on any given mailbox which is the first page on the Phone tab when we are using Outlook Web App. In order to do that we just need to run Get-ActiveSyncDevice as shown in the figure below.
In order to enable the logging, we can run the following cmdlet Set-CASMailbox <Mailbox> –ActiveSyncDebugLogging:$True
If you are not sure if it worked, then we can validate in a simple way, just go to the Outlook Web App and on that specific user the Start Logging was enabled already as we can see in the figure below.
In order to retrieve the logs, we can use the following cmdlet and the advantage of using Exchange Management Shell is that we can redirect the logs to any e-mail address that we want to.
Get-ActiveSyncDeviceStatistics –Mailbox <Mailbox> –GetMailboxLog:$True –NotificationEmailAddresses “firstname.lastname@example.org”
Finally, if you want to disable the logging, just run the same Set-CASMailbox using –ActiveSyncDebugLogging:$False parameter.