Cmdlet Extension Agents
This is one of those blogs that it’s worth absorbing..
Using Cmdlet Extension Agents to cause automatic events to occur in Exchange 2010 - life just got simpler! by Pat Richard.
Cmdlet Extension Agents are something that will be very new to most Exchange administrators but is something that could make life a lot easier..
To quote TechNet:
“Cmdlet extension agents are components in Microsoft Exchange Server 2010 called by Exchange 2010 cmdlets when the cmdlets run. As the name implies, cmdlet extension agents extend the capabilities of the cmdlets that call them by assisting in processing data or performing additional actions based on the requirements of the cmdlet.”
In other words use extension agents to trigger a cmdlet to run every time another cmdlet runs; either before or after it..
At one of my customers these will be used to enable single item recovery for every mailbox each time a new one is created using the new-mailbox cmdlet. The only other way to do it is to schedule a regular task to set this for every mailbox where it is not currently set – still works but not nearly so neat.
Have a look here for information about Cmdlet Extension Agents on TechNet: