Consider the following scenario:
- You enable the Scripting Agent cmdlet extension agent in a Microsoft Exchange Server 2010 environment.
- A script is configured to contain an OnComplete handler.
- You add the script to a configuration file.
- You run a cmdlet to process multiple objects in a pipeline by using the Exchange Management Shell.
WARNING: The cmdlet extension agent with the index Number has thrown an exception in OnComplete(). The exception is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadCommand.set_CommandType(CommandType value)
at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e) at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception)
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Exchange.Configuration.MonadDataProvider.MonadCommand.set_CommandType(CommandType value)
at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e) at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception)