Skip to content

Set Custom Autoreply message for mailbox valid for number of days

About:

Set an auto reply message for a mailbox which will be valid for 60 days from the day you run the script.

 

 

Parameters:

Some of the parameters you may change according to the request.

Some of the parameters you must change according to the request.

 

 

Must change:

  • Under the command “Set-MailboxAutoReplyConfiguration”:
    • -identity, you must enter “Email address of the requested user”
    • -Internalmessage and -externalmessage, you must enter “custom auto reply message”

 

 

May change:

  • Time of the validity of the message. You can set it to whatever you want
  • Under “starttime.adddays(60)”, you may change number 60 to anything else. This command count 60 days in the future of the date of running the script.

 

 

Steps:

  • RDP to the tech box from N-Central or through VPN 
  • Press start and type “power” 
  • Right click on “Windows PowerShell ISE” and click on “Run as Administrator” 

 

  • Click open, navigate to location “C:\scripts”, and click on “Custom-autoreply.ps1” 
  • Be careful, as running the script will action the modifications on the spot.
  • Enter the email address of the user. You just need to replace “email address of the user” with actual email address
     
  • Enter the message in internal and external section. You just need to replace “message” with your actual message.
     
  • Run the script after you enter your modifications
  • It will ask you for creds to connect to office 365. Get it from Secret Server