I am trying to Enable AUTO Out-Of-Office (OOO) message reply for disabled active directory users that own a mailbox in case the employee is terminated or quits.
I have the following powershell scripts to process output of Exchange 2010 PowerShell cmdlets from within a Quest One Identity Manager (Q1IM) process:
Dim theScript As New StringBuilder()
theScript.AppendLine("Get-ADUser -Filter {Enabled -eq $false} -Searchbase 'ou=Disabled Accounts ,Dc=tmglab,DC=local' |" )
theScript.AppendLine("ForEach{")
theScript.AppendLine("Set-MailboxAutoReplyConfiguration -Identity $_")
theScript.AppendLine("-AutoReplyState Enabled")
theScript.AppendLine("-ExternalAudience All")
theScript.AppendLine("-InternalMessage 'Your message to internal users'")
theScript.AppendLine("-ExternalMessage 'Your message to external users'")
theScript.AppendLine("}")
Value = theScript.ToString()
I embeded the script to the VI_EX2K10_ADSAccount_Hide_Mailobject process. But the process doesnt seem working when I send email to the disabled ADS account.
Does anyone out there have any thoughts on how to best accomplish this? Please advise.