Exchange

Microsoft 365: Show Mailboxes that have Auto-Reply enabled

Mailbox auto-reply settings are usually created and defined by the users himself. If you want to get an overview of the auto-reply settings of your organization you have to ask every user: “Do you have auto-reply enabled?” Finally you document the answer of the question in your network documentation. No, not really. You will open PowerShell and hit the keys to get an overview of all auto replys of all users in your organization. How to achieve this? Read on …

To get an overview of all auto-reply settings we need to use PowerShell.

Connect to Microsoft 365 Exchange Online

First, open PowerShell, PowerShell ISE or Visual Studio Code and connect to your Microsoft 365 tenant.


$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Authentication Basic -AllowRedirection -Credential (Get-Credential)

Import-PSSession $Session -DisableNameChecking

How do you know this worked? You should see something like the screen below. PowerShell has imported the Microsoft 365 Exchange Online cmdlets.

Anmerkung 2020-04-04 092638.png

Show all Auto-Reply Rules of all Users

Next, run the following command to retrieve an overview of all Auto-Reply settings of your Microsoft 365 tenant.


Get-Mailbox -ResultSize Unlimited |
Get-MailboxAutoReplyConfiguration |
Where-Object {$_.AutoReplyState -EQ 'Enabled' -or $_.AutoreplyState -EQ 'Scheduled'} |
Select-Object -Property Identity,AutoreplyState,StartTime,EndTime

This should show the output below. Note that I have only one user in my Microsoft 365 tenant so my sample screen is a short one. Your output might be more comprehensive.

Anmerkung 2020-04-04 091730

Disable Auto-Reply on specific users

In case you have found a user that should not have auto-reply enabled, run the following code to deactivate auto-reply on that user.


Set-MailboxAutoReplyConfiguration -Identity f.huber `
-AutoReplyState Disabled

3 replies »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.