
Explanation/Reference:
Explanation:
PowerShell Commands and Piping
The output of the initial command is an input into the next command in the sequence.
The ResultSize parameter specifies the maximum number of results to return. If you want to return all results that match the query, use unlimited for the value of this parameter.
Get-TransportService
Can use this command to obtain a listing of mailbox servers in the organization.
Use the Get-TransportService cmdlet to view the transport configuration information for the Transport service on Mailbox servers or for Edge Transport servers.
Steps
1. Get-TransportService obtains a listing of all mailservers in the exchange organization
2. Get-Queue displays detailed information of the queue on these mailservers
3. Get-Message displays details of the messages in these queue on these mailservers
4. -ResultSize unlimited | Where {$_.Subject -eq "System Alert: Sales Database Reaching Capacity"} | Remove-Message -WithNDr $False This statement returns an unlimited listing of emails with a subject of "System Alert: Sales Database Reaching Capacity"} and removes the ones that do not have a No Delivery Notification attached to them.
(NDR - non-delivery report (NDR) delivery status notification (DSN) messages in Microsoft Exchange Server 2013).
http://technet.microsoft.com/en-us/library/aa998553(v=exchg.141).aspx