Export-ActiveSyncLog

此 cmdlet 仅适用于本地 Exchange。

使用 Export-ActiveSyncLog cmdlet 分析 Internet Information Services (IIS) 日志,并返回有关屏幕上或输出文件中Microsoft Exchange ActiveSync使用情况的信息。

有关以下语法部分的参数设置的详细信息,请参阅 Exchange cmdlet 语法

语法

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

说明

Export-ActiveSyncLog cmdlet 分析 IIS 日志文件并返回有关Exchange ActiveSync使用情况的信息。 此 cmdlet 可以将输出导出到文件或将其显示在 Exchange 命令行管理程序中。

您必须先获得权限,然后才能运行此 cmdlet。 虽然本主题中列出了此 cmdlet 的所有参数,但如果这些参数并未包含在分配给您的权限中,那么您将无法使用这些参数。 若要查找在贵组织中运行任何 cmdlet 或参数所需的权限,请参阅 Find the permissions required to run any Exchange cmdlet

示例

示例 1

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

此示例将日期范围 06/08/18 的Exchange ActiveSync日志导出到 06/09/18。 报表上的时间采用协调世界时 (UTC) 并且报表保存在 c:\exreports\easreports 中。

示例 2

Get-Childitem D:\Logs\*.log | foreach { Export-ActiveSyncLog -Filename $_.FullName -StartDate:"06/20/18" -EndDate:"07/20/18" -UseGMT:$true -Force $true -Confirm -OutputPath:"c:\exreports\easreports" }

此示例通过读取 D:\logs 目录中的所有日志文件,将日期范围 06/20/18 的Exchange ActiveSync日志导出到 07/20/18。 运行报表时将禁止显示所有提示,并显示一条确认消息。 报表上的时间采用 UTC 格式,报表保存在 c:\exreports\easreports 中。

示例 3

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

此示例将日期范围 02/01/18 的Exchange ActiveSync日志导出到 02/09/18。 报告上的时间将使用 UTC,报告将保存在 c:\exreports\easreports 中。

参数

-Confirm

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

Confirm 开关指定是否显示确认提示。 此开关对 cmdlet 造成的影响取决于在你继续操作之前 cmdlet 是否需要确认。

  • 破坏性 cmdlet(例如 Remove-* cmdlets)内置有暂停,可强制要求先确认命令,然后再继续操作。 对于这些 cmdlet,您可以使用此确切语法跳过确认提示:-Confirm:$false
  • 其他大多数 cmdlet(例如 New-* 和 Set-* cmdlet)都没有内置暂停。 对于这些 cmdlet,指定不含值的 Confirm 开关会引入暂停,从而强制要求你先确认命令,然后再继续操作。
类型:SwitchParameter
别名:cf
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-EndDate

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

EndDate 参数指定报告日期范围的结束日期。

类型:DateTime
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Filename

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

Filename 参数指定输入文件的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-Force

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

强制开关隐藏警告或确认消息。 不必为此开关指定值。

您可以在以编程方式运行任务时使用此开关,因为此时并不适合提示用户提供管理输入。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-OutputPath

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

OutputPath 参数指定输出文件的名称和位置。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-OutputPrefix

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

OutputPrefix 参数指定附加到输出文件名称的前缀。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-StartDate

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

StartDate 参数指定报告日期范围的开始日期。

类型:DateTime
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-UseGMT

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

UseGMT 开关指定在报告输出中使用协调世界时 (UTC)(格林威治标准时间)。 不必为此开关指定值。

如果不使用此开关,则使用本地时间。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-WhatIf

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019

WhatIf 开关模拟命令操作。 可以使用此开关在不实际应用将会发生的更改的情况下预览这些更改。 不必为此开关指定值。

类型:SwitchParameter
别名:wi
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

Input types

若要了解此 cmdlet 接受的输入类型,请参阅 cmdlet 的输入和输出类型。 如果 cmdlet 的"输入类型"字段为空,则表明此 cmdlet 不接受输入数据。

输出

Output types

若要了解此 cmdlet 接受的返回类型(亦称为"输出类型"),请参阅 cmdlet 的输入和输出类型。 如果"输出类型"字段为空,则表明此 cmdlet 不返回任何数据。