The Exchange hub and edge transport roles are responsible for handling mail flow inside your organization and can be used to secure messages sent to and received from the Internet. In addition to routing messages, you can apply rules, configure settings, and enforce limits on messages as they pass through the servers in your environment. Transport agents can be used to provide basic anti-spam protection, and both roles implement detailed logging capabilities that can be leveraged from the shell. In this chapter, we'll take a look at several useful scripting techniques that include imposing limits and rules on messages and generating detailed reports on mail flow statistics.
To work with the code samples in this chapter, follow these steps to launch the Exchange Management Shell:
Log onto a workstation or server with the Exchange Management Tools installed
Open the Exchange Management Shell by clicking on Start | All Programs | Exchange Server 2010
Click...