Script for setting Auto Reply in User mailbox

Sundaresan Chandrakanth 11 Reputation points
2022-01-27T07:38:26.157+00:00

Hi

I have specific requirement from my organization that whenever a user resigned, i wish to set an auto reply in his / her mailbox with an alternate contact mail id. preferrably his reporting mail id auto picked as we dont want to shuffle with multiple manual contacts entries.

I wish to automate this with a powershell script so that whenever i disable his AD id and keep his mailbox active for 14 days, this auto reply will be set after disable and the id will be removed after 14 days.

The powershell script has to pick the user who has been disabled and set an MailboxAutoReplyConfiguration command for that mailbox with an external message set to contact his reporting mail id automatically picked from ad information.

Though i have ideas on bits and pieces i dont have the expertise to put it all together. if someone can help, it would really be useful.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,858 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,177 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,364 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 44,776 Reputation points
    2022-01-27T15:40:59.32+00:00

    How about this?

    set-automatic-replies-with-powershell

    As an ex-email administrator this is one of the things that both annoyed me and interfered with the flow of e-mail. An uncontrolled auto-reply that sends a message to a destination that is also an uncontrolled auto-reply recipient will cause a flood of messages that will fill a mailbox (and log files, transaction logs. and mailbox database) and has the potential to degrade the ability of your system to handle normal mail.

    0 comments No comments

  2. Sundaresan Chandrakanth 11 Reputation points
    2022-01-28T04:24:53.017+00:00

    Hi - thanks for your reply. This requirement is only 14 days till the id is kept active and only for external mails needed. so that load will not be that much to handle i feel.

    0 comments No comments