Applies to: Exchange Server 2013

Topic Last Modified: 2012-07-06

Use the Export-ActiveSyncLog cmdlet to parse the Internet Information Services (IIS) logs and return information about Microsoft Exchange ActiveSync usage, either on the screen or in an output file.

For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

Export-ActiveSyncLog -Filename <String> [-Confirm [<SwitchParameter>]] [-EndDate <DateTime>] [-Force <SwitchParameter>] [-OutputPath <String>] [-OutputPrefix <String>] [-StartDate <DateTime>] [-UseGMT <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

This example exports the Exchange ActiveSync log for the date range 06/08/12 to 06/09/12. The times on the report are in Coordinated Universal Time (UTC), and the report is saved in c:\exreports\easreports.

Copy Code
Export-ActiveSyncLog -Filename:"c:\Windows\System32\LogFiles\W2SVC1\ex060812.log" -StartDate:"06/08/12" -EndDate:"06/09/12" -UseGMT:$true -OutputPath:"c:\exreports\easreports"

EXAMPLE 2

This example exports the Exchange ActiveSync log for the date range 06/20/12 to 07/20/12 by reading all log files in the D:\logs directory. All prompts are suppressed while running the report, and a confirmation message is displayed. The times on the report are in UTC, and the report is saved in c:\exreports\easreports.

Copy Code
Dir D:\Logs\*.log | Export-ActiveSyncLog -Filename:"c:\Windows\System32\LogFiles\W2SVC1\ex072012.log" -StartDate:"06/20/12" -EndDate:"07/20/12" -UseGMT:$true -Force $true -Confirm -OutputPath:"c:\exreports\easreports"

EXAMPLE 3

This example exports the Exchange ActiveSync log for the date range 02/01/12 to 02/09/12. The times on the report are in UTC, and the report is saved in c:\exreports\easreports.

Copy Code
Export-ActiveSyncLog -Filename: "c:\Windows\System32\LogFiles\W2SVC1\ex020912.log" -StartDate:"02/01/12" -EndDate:"02/09/12" -UseGMT:$true -OutputPath:"c:\exreports\easreports"

Detailed Description

The Export-ActiveSyncLog cmdlet parses the IIS log files and returns information about Exchange ActiveSync usage. This cmdlet can export the output to a file or display it in the Exchange Management Shell.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Exchange ActiveSync server settings" entry in the Clients and Mobile Devices Permissions topic.

Parameters

Parameter Required Type Description

Filename

Required

System.String

The Filename parameter specifies the name of the input file.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

EndDate

Optional

System.DateTime

The EndDate parameter specifies the end date of the date range of the report.

Force

Optional

System.Management.Automation.SwitchParameter

The Force switch specifies whether to suppress warning or confirmation messages. This switch can be used when the task is run programmatically and prompting for administrative input is inappropriate. If the Force switch isn't provided in the command, you're prompted for administrative input. You don't have to specify a value with this parameter.

OutputPath

Optional

System.String

The OutputPath parameter specifies the name and location for the output file.

OutputPrefix

Optional

System.String

The OutputPrefix parameter specifies a prefix to append to the name of the output file.

StartDate

Optional

System.DateTime

The StartDate parameter specifies the start date of the date range for the report.

UseGMT

Optional

System.Management.Automation.SwitchParameter

The UseGMT switch specifies that Coordinated Universal Time (Greenwich Mean Time) is used for the time in the report output. By default, if this parameter isn't specified, local time is used.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.