I Copied the file to "C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents" directory with name ScriptingAgentConfig.xml however script does not works as per intended purpose but i do have a query how do i verify if the script placed in CmdletExtensionAgents ever executed or not ? below code is suppose to fire a alert or mailbox movement to specified email address in code but i kinda feel helpless with CmdletExtensionAgents there is no error log or clue what happened after placing XML code in directory . Please suggest.
<?xml version="1.0" encoding="utf-8" ?><Configuration version="1.0"><Feature Name="Notify Mailbox Move" cmdlets="New-MoveRequest"><ApiCall Name="OnComplete"> if($succeeded) { $MailboxAlias = $provisioningHandler.UserSpecifiedParameters["Alias"] $DisplayName = $provisioningHandler.UserSpecifiedParameters["DisplayName"] $AdminEmailAddress = "Administrator@domain.com" $emailMsg = "Mailbox -" + $MailboxAlias + "With DisplayName -" + $DisplayName + "has been Moved" $EmailSubject = "Mailbox - " + $MailboxAlias +" Has been Moved" Send-MailMessage -From "MailboxMoveNotifyAgent@domain.com" -To $AdminEmailAddress -SMTPserver "smtp.domain.com" -Subject $EmailSubject -Body $emailMsg -BodyAsHTML }</ApiCall></Feature></Configuration>
Aditya Mediratta