Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Overview of this book

Table of Contents (22 chapters)
Microsoft Exchange 2010 PowerShell Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Searching anti-spam agent logs


Exchange 2010 hub and edge transport servers are capable of using several anti-spam agents to reduce the amount of unwanted e-mail messages that enter your organization. All anti-spam activity is logged by transport servers, and this data can be used to troubleshoot issues and generate reports. In this recipe, you'll learn how to search the anti-spam agent logs using the Exchange Management Shell.

How to do it...

The Get-AgentLog cmdlet can be used to parse the anti-spam agent logs. To find all log entries for a particular agent, filter the output based on the Agent property:

Get-AgentLog | ?{$_.Agent -eq 'Content Filter Agent'}

When running this command in a busy environment, you may get back a large number of results, and you may want to consider refining your filter and perhaps limiting the date range to a specific period of time.

How it works...

All of the anti-spam agents use a series of logfiles on each transport server with the anti-spam agents installed...