Get Mailbox Automatic Reply Configuration Using PowerShell

Automatic reply messages help Exchange administrators understand user’s absence. Users must set up out of office settings to inform the unavailability, as it is easier for everyone to understand. The administrator must monitor auto-reply settings to prevent communication breakdowns between unavailable users and their clients.

Exchange admins must monitor automatic replies settings regularly as users turn it on and off as needed. They should maintain automated ways to identify Office 365 users’ automatic message configurations effectively.


How to Check Out of Office Status in Exchange:

Using UI: You can view the automatic replies (out of office) in the Office 365 admin center. Click on the user profile and go to the ‘Mail’ option. You can see users’ out of office enabled status under ‘Automatic Replies’. But it is impossible to see a list of all users’ out of office set up as reports in UI.

Using PowerShell: The PowerShell cmdlet ‘Get-MailboxAutoReplyConfiguration’ can provide details related to the ‘Automatic replies’ setting. To view all Office 365 users enabled out of office configuration, you need ‘Get-Mailbox’ cmdlet to supply user identity. However, multiple formatting is required to obtain various report formats, which is a time-consuming activity.

To overcome the UI and PowerShell limitations, we have created a ‘GetMailboxAutoReplyConfiguration.ps1’ script to meet your business requirements. Let us discuss the script’s functionality in detail.


Script Highlights:  
  • Generates 5 different types of out of office set up status reports  
  • Automatically installs the Exchange Online module upon your confirmation when it is not available in your machine 
  • Lists aggregated result of users with enabled and scheduled auto-reply set up 
  • Retrieves users who have enabled auto-reply settings 
  • Generates users who configured scheduled out of office set up separately 
  • Lists currently unavailable users’ out of office configurations
  • You have an option to get the disabled mailboxes with active automatic reply setting 
  • Delivers Office 365 users’ upcoming out of office plans details 
  • Supports both MFA and Non-MFA accounts
  • Exports the report in CSV format
  • The script is scheduler-friendly. You can automate the report generation upon passing credentials as parameters


Download Script: GetMailboxAutoReplyConfiguration.ps1


Get Mailbox Auto Reply Configuration – Script Overview:

The script has all the significant use cases and easy execution formations. The report has detailed data that will help you to get users out of office settings quickly. You can obtain various automatic reply set up reports as follows.


Get a List of Users with Auto-Reply Configuration:

The majority of Office 365 users set up their automatic reply configuration to prevent miscommunication. It is the admin’s responsibility to ensure users’ setting correctness in both enabled and scheduled configurations. Using the simple execution format below, you can easily get users having automatic out-of-office setup.

The administrators can use the report data to find users having both enabled and scheduled out of office set up. They can determine if the setting is completed properly based on the report’s significant details.

Sample Output:

Get a List of Users with Auto-Reply Configuration


Get Office 365 Users with Out of Office Enabled:

Office 365 users can easily notify their absence by enabling the automatic reply set up. It will help the internal and external mail senders to understand their next availability status clearly. All users must enable the out of office set up during a day off, and it is the administrators’ responsibility to ensure that. You can simply use the ‘Enabled’ switch param to get a list of all users who enabled auto-reply settings.

By using the above format, you can get all the users who turn on the auto-reply setting. The report data provides external audience, users’ internal and external auto-reply messages to understand the reason for absence in detail.

Sample Output:

Get Office 365 Users with Out of Office Enabled


Get Users Who Scheduled Automatic Replies:

The administrators must be aware of the mandatory attendees’ availability to schedule important client meetings and discussions. The administrator needs Office 365 users’ temporary and unplanned unavailability list to organize the critical events. You can use the switch param ‘Scheduled’ to find users who scheduled out of office in office 365.

The report data contains the ‘OOF Duration (Days:Hours:Mins)’ value, which helps know the users’ unavailable duration accurately. The administrator can plan the events wisely based on their pre-planned out of office setup using the report.

Sample Output:

Get Users Who Scheduled Automatic Replies

Get All Users Who are Currently Unavailable:

Administrators perform a check to determine which Office 365 users are currently unavailable to participate in organizational activity. Administrators must be kept up to date on the current availability of their users regularly. You can use the ‘Today’ switch param to get auto-reply set up of the currently unavailable users.

The output data has all the inactive users along with the end date of their absence. The ‘External Audience’ value in the report helps the admin confirm the auto-reply visibility to clients. Additionally, admins can use the report as a leave tracker.


List Users Having Pre-Planned Auto-Reply Set Up:

Office 365 users plan their vacation auto-reply plans ahead of time and schedule their work accordingly. Administrators monitor the users’ long vacation auto-reply set up to schedule significant organization events, depending on the participant’s population. To mention the days of your choice as input, use the ‘ActiveOOFAfterDays’ param and get all users out of office set up.

The above example gets users having vacation auto-reply set up on and after 14 days. The output file gives complete information with both enabled and scheduled automatic reply set up. Using the data, you can plan all future events properly.


Get Disabled Accounts Auto-Reply Configuration:

Even after a user account is disabled, the automatic reply settings for Office 365 users will remain active. Hence, your clients might wait indefinitely for a response from those disabled users. You can use the ‘DisabledMailboxes’ switch param to identify the disabled users with auto-reply setup easily. The administrators can use this report to redirect the client on time and eliminate business escalation risks.

Using this execution format, you can get all the disabled accounts with active out of office configuration (both enabled and scheduled). The administrator can use this report data to redirect the senders to active mail responders.


Schedule an Out of Office Status Report:

Office 365 users change the automatic reply set up time to time based on their requirements. You can schedule the PowerShell script to monitor the dynamic settings. To schedule the execution, you can use both MFA and non-MFA accounts.

To use the non-MFA admin accounts, try the format below.

If the admin account has MFA, then they cannot use it directly for scheduling. Instead, you have to disable MFA based on the Conditional Access Policy to make it work.

We hope this article is helpful in getting users sending automatic replies and planning the organization’s activities precisely. Let us know your questions.