Export (0) Print
Expand All

Get-AgentLog

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

Use the Get-AgentLog cmdlet to parse log files that you specify as parameters and collect raw statistics from the filtering that anti-spam agents apply during a time period that you specify.


Get-AgentLog [-EndDate <DateTime>] [-Location <LocalLongFullPath>] [-StartDate <DateTime>]

Parameter Required Type Description

EndDate

Optional

System.DateTime

The EndDate parameter specifies the date and time that you want to stop collecting statistics. The default time is the current time. When you enter a specific date, use the short date format defined in the Regional Options settings configured on the local computer. For example, if your computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2010 to specify March 1, 2010. You can enter the date only, for example, 10/05/2010. Or you can enter the date and time of day. If you enter a time of day and date, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00:00 PM".

Location

Optional

Microsoft.Exchange.Data.LocalLongFullPath

The Location parameter specifies the directory that contains the log files that you can use to build usage reports. The default path is C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\AgentLog. You must enter the file path in quotation marks ("), for example, "C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\AgentLog".

StartDate

Optional

System.DateTime

The StartDate parameter specifies the date and time that the collection of statistics starts. The default time is the current time. When you enter a specific date, use the short date format defined in the Regional Options settings configured on the local computer. For example, if your computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2010 to specify March 1, 2010. You can enter the date only, for example, 10/05/2010, or you can enter the date and time of day. If you enter a time of day and date, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00:00 PM".

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 "Anti-spam features" entry in the Transport Permissions topic.

This example returns a report that has statistics collected between 09:00 (9 A.M.), January 4, 2010 and 18:00 (6 P.M.), January 8, 2010.

Get-AgentLog -StartDate "01/04/2010 9:00:00 AM" -EndDate "01/08/2010 6:00:00 PM"
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft