locked
Scripting agent problem RRS feed

  • Question

  • Hi,

    I'm trying to configure newly created mailbox users using Exchange 2010 SP1 scripting agent (cmdlet extension agent). I want to enable or disable features like OWA or ActiveSync. I was almost able to achieve my goal using the technique described here : http://www.ucblogs.net/blogs/exchange/archive/2010/05/29/Using-Scriping-Agent-to-cause-automatic-events-to-occur-in-Exchange-2010-_2D00_-life-just-got-simpler_2100_.aspx .

    It's working fine for New-Mailbox cmdlet (new users not already in AD), but I can't make it work for Enable-Mailbox cmdlet (users already existing in AD). I receive an error when I mail-enable a user if I use the technique described in the first link or here : http://www.flobee.net/automatically-disable-activesync-for-new-mailboxes-in-exchange-2010


    Warning:
    The cmdlet extension agent with the index 5 has thrown an exception in OnComplete(). The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: ScriptingAgent: Exception thrown while invoking scriptlet for OnComplete API: Cannot bind argument to parameter 'Identity' because it is null.. ---> System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Identity' because it is null.
       at System.Management.Automation.ParameterBinderBase.ValidateNullOrEmptyArgument(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, Type argumentType, Object parameterValue, Boolean recurseIntoCollections)
       at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
       at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
       at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
       at System.Management.Automation.ParameterBinderController.BindPositionalParametersInSet(UInt32 validParameterSets, Dictionary`2 nextPositionalParameters, CommandParameterInternal argument, ParameterBindingFlags flags, ParameterBindingException& bindingException)
       at System.Management.Automation.ParameterBinderController.BindPositionalParameters(Collection`1 unboundArguments, UInt32 validParameterSets, UInt32 defaultParameterSet, Boolean ignoreArgumentsThatLookLikeParameters, ParameterBindingException& outgoingBindingException)
       at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
       at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
       at System.Management.Automation.CommandProcessor.BindCommandLineParameters(CommandParameterInternal[] parameters)
       at System.Management.Automation.CommandProcessor.Prepare(CommandParameterInternal[] parameters)
       at System.Management.Automation.CommandProcessorBase.DoPrepare(CommandParameterInternal[] parameters)
       at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
       at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
       --- End of inner exception stack trace ---
       at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e)
       at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception)

    Exchange Management Shell command completed:
    Enable-Mailbox -Identity 'XXX' -Alias 'xxx'

     

    From this message I understand that the identity couldn't be obtained from the provisioning handler. Does anyone have managed to make it work with Enable-Mailbox cmdlet ?

    Thanks in advance for your help.

     

    Monday, January 31, 2011 1:42 PM

Answers

  • Hi,

    After some more testing I finally found the right way to do this. Here's the code, I hope this will help someone else !

    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration version="1.0">
     <Feature Name="MailboxProvisioning" Cmdlets="enable-mailbox">
      <ApiCall Name="OnComplete">
       if($succeeded)    {
        Set-ADServerSettings -ViewEntireForest $true   
        $user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Identity"]
        $mbx = Get-Mailbox -Identity $user.DistinguishedName
        Set-CasMailbox $mbx -PopEnabled $false -ImapEnabled $false
       }
      </ApiCall>
     </Feature>
    </Configuration>

    Note that you might need to add the DomainController parameter to all cmdlets above to avoid the synchronization issue I mentioned in my previous post. It seems to appear once in while without this.


    Best regards.

    • Marked as answer by sebcou Monday, February 7, 2011 12:47 PM
    • Edited by sebcou Monday, February 7, 2011 1:06 PM Added note
    Monday, February 7, 2011 12:46 PM

All replies

  • Hi Sebcou,

    How about use below:
    sion="1.0" encoding="utf-8" ?>
    <Configuration version="1.0">
        <Feature Name="MailboxProvisioning" Cmdlets="enable-mailbox">
            <ApiCall Name="OnComplete">
                if($succeeded)
                    {
                    $user = (Get-User $provisioningHandler.UserSpecifiedParameters["Identity"])
                    Set-CASMailbox $user -ActiveSyncEnabled $false
                    }
            </ApiCall>
        </Feature>
        <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox">
            <ApiCall Name="OnComplete">
                if($succeeded)
                    {
                    $user = (Get-User $provisioningHandler.UserSpecifiedParameters["Name"]).distinguishedName
                    Set-CASMailbox $user -ActiveSyncEnabled $false
                    }
            </ApiCall>
        </Feature>
    </Configuration>

    What identity do you use?
    GUID
    Distinguished name (DN)
    Domain\Account
    User principal name (UPN)
    How about use the DN directly?

    Regards!
    Gavin


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, February 4, 2011 8:02 AM
  • Hi Gavin,

    Thank you for your help ! I tried your code but it doesn't work. I found a part of the solution though. My users and my Exchange servers are not in the same domain so when I run Get-User in the script it returns nothing. If I add the DomainController parameter to Get-User I now get the user object. I verified by debugging the script with Out-File cmdlet.

    But now I don't find the correct way to pass the user to Set-CASMailbox. I always get an error stating "Cannot convert the "xxx" value of type "Microsoft.Exchange.Configuration.Tasks.UserIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter". Tried with GUID, DN, UPN...

    The funny thing is that if I run the same code in EMS it works perfectly. I also tried to use Get-Mailbox instead of Get-User but it returns nothing. I suspect that the mailbox object isn't ready when the script is run and that's what causes the scripting agent failure.

    Now I'm wondering if there's a way to obtain the name of the DC where the Enable-Mailbox was run and use it for each cmdlet in the script, maybe I would get the mailbox object... Any thoughts ?

    Best regards.

    Friday, February 4, 2011 9:40 AM
  • Hi,

    After some more testing I finally found the right way to do this. Here's the code, I hope this will help someone else !

    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration version="1.0">
     <Feature Name="MailboxProvisioning" Cmdlets="enable-mailbox">
      <ApiCall Name="OnComplete">
       if($succeeded)    {
        Set-ADServerSettings -ViewEntireForest $true   
        $user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Identity"]
        $mbx = Get-Mailbox -Identity $user.DistinguishedName
        Set-CasMailbox $mbx -PopEnabled $false -ImapEnabled $false
       }
      </ApiCall>
     </Feature>
    </Configuration>

    Note that you might need to add the DomainController parameter to all cmdlets above to avoid the synchronization issue I mentioned in my previous post. It seems to appear once in while without this.


    Best regards.

    • Marked as answer by sebcou Monday, February 7, 2011 12:47 PM
    • Edited by sebcou Monday, February 7, 2011 1:06 PM Added note
    Monday, February 7, 2011 12:46 PM
  • Hi there,

    I'm trying to use PowerShell create a new mailbox in Exch2010 as below:

    New-Mailbox -Name 'Chris Ashton' -Alias 'CAshton' -OrganizationalUnit 'Users' -UserPrincipalName 'CAshton@mydomain.com' -SamAccountName 'CAshton' -FirstName 'Chris' -Initials '' -LastName 'Ashton' -Password $password -ResetPasswordOnNextLogon $true -Database 'Database X'

    This is the script that I copied from the ECM but it doesn't work. I keep getting the below Warning:

    WARNING: The cmdlet extension agent with the index 5 has thrown an exception in OnComplete(). The exception is: System.InvalidOperationException: Operation is not valid due to the current state of the object.
       at Microsoft.Exchange.Data.Storage.ExchangePrincipal.get_ServerFullyQualifiedDomainName()
       at Microsoft.Exchange.Data.Storage.MailboxSession.Initialize(MapiStore linkedStore, LogonType logonType, ExchangePrincipal owner, DelegateLogonUser delegateUser, Object identity, OpenMailboxSessionFlags flags, GenericIdentity auxiliaryIdentity)
       at Microsoft.Exchange.Data.Storage.MailboxSession.<>c__DisplayClass12.<CreateMailboxSession>b__10(MailboxSession mailboxSession)
       at Microsoft.Exchange.Data.Storage.MailboxSession.InternalCreateMailboxSession(LogonType logonType, ExchangePrincipal owner, CultureInfo cultureInfo, String clientInfoString, IAccountingObject budget, Action`1 initializeMailboxSession, InitializeMailboxSessionFailure initializeMailboxSessionFailure)
       at Microsoft.Exchange.Data.Storage.MailboxSession.CreateMailboxSession(LogonType logonType, ExchangePrincipal owner, DelegateLogonUser delegateUser, Object identity, OpenMailboxSessionFlags flags, CultureInfo cultureInfo, String clientInfoString, PropertyDefinition[] mailboxProperties, IList`1 foldersToInit, GenericIdentity auxiliaryIdentity, IAccountingObject budget)
       at Microsoft.Exchange.Data.Storage.MailboxSession.ConfigurableOpen(ExchangePrincipal mailbox, MailboxAccessInfo accessInfo, CultureInfo cultureInfo, String clientInfoString, LogonType logonType, PropertyDefinition[] mailboxProperties, InitializationFlags initFlags, IList`1 foldersToInit, IAccountingObject budget)
       at Microsoft.Exchange.Data.Storage.MailboxSession.OpenAsSystemService(ExchangePrincipal mailboxOwner, CultureInfo cultureInfo, String clientInfoString)
       at Microsoft.Exchange.ProvisioningAgent.MailboxLoggerFactory.XsoMailer.Log(AdminLogMessageData data, LogMessageDelegate logMessage)
       at Microsoft.Exchange.ProvisioningAgent.AdminLogProvisioningHandler.OnComplete(Boolean succeeded, Exception e)
       at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception)

    Any idea why it is throwing this warning?


    DBA
    Friday, February 11, 2011 8:07 PM
  • Hi,

    Check your ScriptingAgentConfig.xml file in ...\bin\CmdletExtensionAgents folder. For testing purposes, you can comment lines with the # character to see exactly what causes this error.

    Best regards.

     

    Monday, February 14, 2011 6:09 AM
  • I tried using this to set calendar permission's when using enable-mailbox

     

     

    Set-ADServerSettings -ViewEntireForest $true 
    
    $user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Identity"] 
    
    $mbx = Get-Mailbox -Identity $user.DistinguishedName
    
    Set-MailboxFolderPermission -Identity $mbx$(':\Calendar') -User Default -AccessRights LimitedDetails
    

     

     

    however found that this would work 50% of the time and the rest would give "Exception thrown while invoking scriptlet for OnComplete API: Cannot bind argument to parameter 'Identity' because it is null.."

    what the?? how can identity only be populated some of the time?

    After trying so many ways to populate identity I ended up throwing in a start-sleep before it tries to populate the variables and it now works 100% of the time.. maybe my exchange server is a bit slow and just needs a few extra seconds to finish the previous task.

     

    start-sleep -s 10
    Set-ADServerSettings -ViewEntireForest $true 
    $user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Identity"] 
    $mbx = Get-Mailbox -Identity $user.DistinguishedName
    Set-MailboxFolderPermission -Identity $mbx$(':\Calendar') -User Default -AccessRights LimitedDetails
    

     

     

    Thanks for this, this resolved my issues as well -- although it is frustrating to artificially introduce a delay into the mailbox creation process. My issue was some of our domain controllers wouldn't know about the object when it was created, so they couldn't update it.


    Thursday, August 18, 2011 3:55 PM
  • Hi,
    I have the exact same issue where there is an intermittent failure, but I am not sure what domain controller parameter you are referring to in order to resolve this?

    Wednesday, February 15, 2012 11:32 PM
  • Hi,

    Many cmdlets have the -DomainController parameter. See the code below :

    <configuration version="1.0">
     <feature cmdlets="enable-mailbox" name="MailboxProvisioning">
      <apicall name="OnComplete">
       if($succeeded)    {
        $dc = "dc.domain.com"
        Set-ADServerSettings -ViewEntireForest $true
    	
    	$user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters["Identity"] -DomainController $dc
    	$mbx = Get-Mailbox -Identity $user.DistinguishedName -DomainController $dc
    	
    	Set-CasMailbox -Identity $mbx -PopEnabled $false -ImapEnabled $false -ActiveSyncEnabled $true -OWAEnabled $true -DomainController $dc
       }
      </apicall>
     </feature>
     
     <feature cmdlets="new-mailbox" name="MailboxProvisioning">
      <apicall name="OnComplete">
       if($succeeded)    {
        $dc = "dc.domain.com"
    	
        Set-ADServerSettings -ViewEntireForest $true	
        $mbx = $provisioningHandler.UserSpecifiedParameters["Name"]
    	
        Set-CasMailbox -Identity $mbx -PopEnabled $false -ImapEnabled $false -ActiveSyncEnabled $true -OWAEnabled $true -DomainController $dc
       }
      </apicall>
     </feature>
    </configuration>

    Even with this parameter I encounter intermittent failure sometimes (but less than without). I haven't played with the setting for a while, maybe it works better if you specify a GC or the DC having the PDC role.

    Hope it helps.

    Best regards.


    • Edited by sebcou Thursday, February 16, 2012 6:16 AM
    Thursday, February 16, 2012 6:16 AM
  • Sadly my results were similar to sebcou's.  :(
    Thursday, February 16, 2012 2:58 PM
  • Hi everyone,

    I'm having a similar problem with a script for the scripting agent...

    I want to accomplish that the agent activates mailbox auditing, if an administrator account adds FullAccess rights to a mailbox for himself.
    The script already fails when trying to activate mailbox auditing for any user.

    This is the code:

     <Feature Name="MailboxPermissionsAdd" Cmdlets="Add-MailboxPermission,Add-ADPermission">
    	<ApiCall Name="OnComplete">
    
       		if($succeeded)    {
    		Start-Sleep -s 5
    		$dc = "server.domain.net"
    		Set-ADServerSettings -ViewEntireForest $true
    		$provisioningHandler.UserSpecifiedParameters["Identity"] >> C:\UserAccess.txt
    		$mailbox = Get-Mailbox -Identity $provisioningHandler.UserSpecifiedParameters["Identity"]
        		set-mailbox $mailbox -AuditEnabled $true -AuditDelegate Update,Copy,Move,MoveToDeletedItems,SoftDelete,HardDelete,FolderBind,SendAs,SendOnBehalf -AuditAdmin Update,Copy,Move,MoveToDeletedItems,SoftDelete,HardDelete,FolderBind,SendAs,SendOnBehalf,MessageBind
    		$mailbox.Name >> C:\UserAccess.txt
    		$provisioningHandler.UserScope.UserID >> C:\UserAccess.txt
    		$provisioningHandler.TaskName >> C:\UserAccess.txt
    		}
    
    	</ApiCall>
     </Feature>

    The script throws the following error:

    Warning:
    The cmdlet extension agent with the index 0 has thrown an exception in OnComplete(). The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: ScriptingAgent: Exception thrown while invoking scriptlet for OnComplete API: Cannot bind parameter 'Identity'. Cannot convert the "domain.net/Users/Alex" value of type "Microsoft.Exchange.Configuration.Tasks.ADRawEntryIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter".. ---> System.Management.Automation.ParameterBindingException: Cannot bind parameter 'Identity'. Cannot convert the "domain.net/Users/Alex" value of type "Microsoft.Exchange.Configuration.Tasks.ADRawEntryIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter". ---> System.Management.Automation.PSInvalidCastException: Cannot convert the "domain.net/Users/Alex" value of type "Microsoft.Exchange.Configuration.Tasks.ADRawEntryIdParameter" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter".
       at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type resultType, Boolean recursion, IFormatProvider formatProvider, TypeTable backupTypeTable)
       at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type resultType, IFormatProvider formatProvider)
       at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)
       --- End of inner exception stack trace ---
       at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)
       at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
       at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
       at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
       at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection`1 arguments, CommandMetadata commandMetadata)
       at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
       at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
       at System.Management.Automation.CommandProcessor.BindCommandLineParameters(CommandParameterInternal[] parameters)
       at System.Management.Automation.CommandProcessor.Prepare(CommandParameterInternal[] parameters)
       at System.Management.Automation.CommandProcessorBase.DoPrepare(CommandParameterInternal[] parameters)
       at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
       at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
       --- End of inner exception stack trace ---
       at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e)
       at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnComplete(Task task, Boolean succeeded, Exception exception)

    I added the line

    $provisioningHandler.UserSpecifiedParameters["Identity"] >> C:\UserAccess.txt

    to the script to see, if there even is a value, and yes, it looks like the identity of the user.
    But I don't understand, why this value cannot be used for the get-mailbox or set-mailbox cmdlet.
    Note: I also tried with the get-user cmdlet. No success.

    Did anyone come across this issue?

    Any help highly appreciated!
    Cheers,
    Alex



    • Edited by Alexander_C Wednesday, June 20, 2012 8:53 AM
    Wednesday, June 20, 2012 8:22 AM
  • Finally I got it running.

    Working code:

       		if($succeeded)    {
    		$id = ($provisioningHandler.UserSpecifiedParameters["Identity"]).ToString() # friggin necessary!!!!!!!!!!!!!
    		$id >> C:\UserAccess.txt
        		$mailbox = Get-Mailbox -Identity $id
        		set-mailbox $mailbox -AuditEnabled $true -AuditDelegate Create,FolderBind,SendAs,SendOnBehalf,SoftDelete,HardDelete,Update,Move,MoveToDeletedItems -AuditAdmin Update,Copy,Move,MoveToDeletedItems,SoftDelete,HardDelete,FolderBind,SendAs,SendOnBehalf,MessageBind
    		$mailbox.Name >> C:\UserAccess.txt
    		$provisioningHandler.UserScope.UserID >> C:\UserAccess.txt
    		$provisioningHandler.TaskName >> C:\UserAccess.txt
    		$mailbox | fl Audit* >> C:\UserAccess.txt
    		}
    

    Cheers,

    Alex

    • Proposed as answer by Alexander_C Wednesday, June 20, 2012 1:17 PM
    Wednesday, June 20, 2012 1:17 PM
  • Thanks! It's work for me
    Monday, March 16, 2015 9:48 AM
  • Trying this exact code and still getting an error when I create a new shared mailbox

    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration version="1.0">
    	<Feature Name="MailboxProvisioning" Cmdlets="New-Mailbox,Enable-Mailbox">
    		<ApiCall Name="OnComplete">
    		if($succeeded)    
    		{
    			$id = ($provisioningHandler.UserSpecifiedParameters["Identity"]).ToString() 
    			$id >> C:\UserAccess.txt
    		   	$mailbox = Get-Mailbox -Identity $id
        		set-mailbox $mailbox -AuditEnabled $true
    			$mailbox.Name >> C:\UserAccess.txt
    			$provisioningHandler.UserScope.UserID >> C:\UserAccess.txt
    			$provisioningHandler.TaskName >> C:\UserAccess.txt
    			$mailbox | fl Audit* >> C:\UserAccess.txt
    		}
    		</ApiCall>
    	</Feature>
    </Configuration>
    	

    I checked C:\UserAccess.txt as were logging to this file and I notice the top half of the file lists every single exchange account's name, then after its done listing that, it basically lists the fl audit* for every single mailbox on the entire system, and the last one is the test shared mailbox which is $false, which obviously by the command above it should be true.

    I get this error when I create a new shared mailbox called test:

    The cmdlet extension agent with the index 5 has thrown an exception in OnComplete(). The exception is: Microsoft.Exchange.Provisioning.ProvisioningException: ScriptingAgent: Exception thrown while invoking scriptlet for OnComplete API: Cannot convert 'System.Object[]' to the type 'Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter' required by parameter 'Identity'. Specified method is not supported.. ---> System.Management.Automation.ParameterBindingException: Cannot convert 'System.Object[]' to the type 'Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter' required by parameter 'Identity'. Specified method is not supported. ---> System.NotSupportedException: Specified method is not supported. at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue) --- End of inner exception stack trace --- at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at
    System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) --- End of inner exception stack trace --- at Microsoft.Exchange.ProvisioningAgent.ScriptingAgentHandler.OnComplete(Boolean succeeded, Exception e) at Microsoft.Exchange.Provisioning.ProvisioningLayer.OnCompleteImpl(Task task, Boolean succeeded, Exception exception)

    Thursday, February 25, 2016 3:07 PM