Blog
Bulk Configure Out-of-Office in Microsoft 365

Bulk Configure Out-of-Office in Microsoft 365

Published on: Nov 01, 2026
•
5 min read
Summarize with

“Please set your out-of-office before you leave on Friday.”

Most admins send an email like that before a holiday, then discover in January how it went. A few people forgot. Two used last year’s dates. One wrote “back soon” with no return date or backup contact, and a customer waited a week for an answer.

Asking everyone to set their own reply sounds like the easiest option. But you’re still the one fixing mistakes, and you only find them after customers have seen them.

The other option is to set replies centrally, and you don’t need the scripting skills many admins expect. 

For one mailbox, the Microsoft 365 admin center takes about a minute and needs no password. For a whole team, one PowerShell command, repeated from a spreadsheet, sets every reply with the right dates and messages in one run.

Below, I’ll show you how to set out-of-office in Microsoft 365 for one mailbox or hundreds. 

That includes the roles you need, a ready-to-use script, a Power Automate flow for recurring absences, and fixes for the most common errors.

Table of Contents

Quick comparison: admin center vs PowerShell vs Power Automate

Microsoft 365 gives you three ways to set out-of-office replies, each suited to a different number of mailboxes. Here’s how they compare, so you can choose the right one. 

Features Microsoft 365 admin center Exchange Online PowerShell Power Automate
Best for One or two mailboxes Many mailboxes at once, such as a company-wide closure Individual absences that come up all year
How you set it Clicking through each user's settings One script that reads a CSV A flow that runs when something triggers it, like an approved leave request
Start and end dates Yes, per mailbox Yes, per row in the CSV Yes, taken from the trigger, such as dates in a form
Different messages per team Typed separately for each mailbox Written into the CSV Set with conditions in the flow
Skill needed None Comfortable running a script Comfortable building a flow
Record of what changed None A log file from the script The flow's run history

For one mailbox, use the admin center. For a one-off change across a list of mailboxes, use PowerShell. For absences you don’t want to set manually again, build a Power Automate flow.

What you need before you configure out-of-office in bulk

Most bulk runs don’t fail because of the script. They fail because the account lacks permission or the person running it is connected to the wrong tenant. I’d check both before writing a single message.

The admin role you need

You don’t need to be a Global Administrator. Many companies reserve that role for a few people, and asking for it just to set automatic replies won’t go down well with IT. Here are the options, from most access to least.

Role Can it set out-of-office in bulk? Notes
Global Administrator Yes Full access to every Microsoft 365 service, so many companies keep it to a few people.
Exchange Administrator Yes Full access to Exchange Online, including mailbox settings, in both PowerShell and the Exchange admin center. This is the role I'd ask for.
Mail Recipients permission Yes An Exchange permission that covers mailbox settings, including automatic replies, without full Exchange admin rights.
Helpdesk Administrator Not on its own It can help with individual users, but bulk changes need one of the roles above.

Tools to install and connect

For bulk changes, you need three things.

  • PowerShell 5.1 or later on your computer.
    ‍
  • The Exchange Online Management module installed in PowerShell. Connect using Connect-ExchangeOnline and sign in with your admin account.
    ‍
  • A spreadsheet tool such as Excel to build the mailbox and message list your script reads.

Keep the Exchange admin center open too. It’s the quickest way to check a mailbox after a bulk run and confirm the reply, dates, and message match your settings.

Before using the full list, test on two or three mailboxes. If permissions or the connection are wrong, you’ll find out on three mailboxes rather than three hundred.

How to set out of office in Microsoft 365 for one mailbox

If you’re covering only one or two people, you don’t need PowerShell. The Microsoft 365 admin center lets you set someone’s automatic reply without signing into their mailbox or knowing their password. 

From the Microsoft 365 admin center

  1. Go to Users, then Active users.
    ‍
  2. Click the person’s name to open their account panel.
    ‍
  3. Open the Mail tab, then select Automatic replies.
    ‍
  4. Turn on automatic replies.
    ‍
  5. To start and stop replies automatically, select the option to send only during a set period, then choose the start and end dates.
    ‍
  6. Write the message for people inside your organization. Then, if needed, enable external replies and write a separate message.
    ‍
  7. Save.

For your own mailbox, you don’t need the admin center. In Outlook, go to File, then Automatic Replies. In Outlook on the web, go to Settings, then Mail, then Automatic replies.

When this method stops working

The admin center works well for one mailbox. The problems start when you repeat it 40 times before a company holiday.

  • Each mailbox needs its own set of clicks, so a team-wide change can take an afternoon.
    ‍
  • If two admins split the list, the messages can differ. One includes a backup contact, while the other forgets the return date.
    ‍
  • A mistyped date is easy to miss and hard to find later, because nobody checks 40 settings panels side by side.

If that sounds familiar, PowerShell is a better choice. You write the message once, keep all dates in one file, and apply the full list in one run. 

How to set out-of-office for many mailboxes with PowerShell

You don’t need to know how to write scripts for this. The job is one command repeated for every spreadsheet row. You fill in the spreadsheet, and PowerShell handles the repetition. 

The Set-MailboxAutoReplyConfiguration cmdlet

This command sets automatic replies for a mailbox. It works for one person at a time. 

Set-MailboxAutoReplyConfiguration -Identity "alex@company.com" -AutoReplyState Scheduled -InternalMessage "I'm away until January 4. For anything urgent, contact Priya in the sales team." -ExternalMessage "Thanks for your email. I'm away until January 4 and will reply when I'm back." -StartTime "12/23/2026 5:00 PM" -EndTime "1/4/2027 8:00 AM"

Each part does one job:

Parameter What it does
Identity The mailbox you're changing
AutoReplyState Enabled turns replies on now. Scheduled turns them on and off using your dates. Disabled turns them off.
InternalMessage The reply people inside your organization get
ExternalMessage The reply people outside your organization get
StartTime and EndTime When the reply starts and stops

One detail often trips people up. StartTime and EndTime work only when AutoReplyState is set to Scheduled. With Enabled, the dates are ignored, and replies stay on until someone turns them off. 

Run it across a CSV of mailboxes

Build a spreadsheet with one row per mailbox and these five columns. 

Email InternalMessage ExternalMessage StartTime EndTime
alex@company.com I'm away until January 4... Thanks for your email... 12/23/2026 5:00 PM 1/4/2027 8:00 AM

Save it as a CSV with UTF-8 encoding. If a message contains a comma, Excel adds quotes when saving to keep the columns aligned.

Then connect and run the loop.

Connect-ExchangeOnline
‍
$rows = Import-Csv -Path "C:\ooo\mailboxes.csv" -Encoding UTF8
‍
foreach ($row in $rows) {
    try {
        Set-MailboxAutoReplyConfiguration -Identity $row.Email -AutoReplyState Scheduled -InternalMessage $row.InternalMessage -ExternalMessage $row.ExternalMessage -StartTime $row.StartTime -EndTime $row.EndTime -ErrorAction Stop
        Add-Content -Path "C:\ooo\log.csv" -Value "(row.Email),Done"
    }
    catch {
        Add-Content -Path "C:\ooo\log.csv" -Value "(row.Email),Failed,(_.Exception.Message)"
    }
}

The only line you need to change is the file path. The log marks each mailbox as Done or Failed, with the reason, so one bad address won’t stop the run, and you can check the results afterward.

Need different messages for different teams? Put them in the CSV. The script reads each row’s messages, so sales and support can have different replies in the same run.

Schedule replies, and turn them off afterward

Because the script uses Scheduled, each reply stops automatically at its EndTime. I’d always include an end date, even for an open-ended absence. A reply left running for months after someone returns confuses everyone who emails them.

Before the full run, test the script with a CSV containing two or three mailboxes. Then open one in the Exchange admin center, or run Get-MailboxAutoReplyConfiguration -Identity with its address, and check that the dates and messages match.

If plans change and replies need to stop early, run the same loop with one change. Set AutoReplyState to Disabled and remove the message and date parameters.

Automate out-of-office replies with Power Automate

PowerShell handles one-off changes. You run it once to set every reply on your list. Power Automate handles absences you don’t want to manage each time manually. You build the workflow once, and it sets replies whenever its trigger runs. 

Trigger replies from a leave request

Most companies already track time off somewhere. Power Automate can use that record to set a reply, so nobody has to remember. Here’s a flow based on a Microsoft Forms leave request. 

  1. Trigger — An employee submits the leave form with their start date, end date, and backup contact.
    ‍
  2. Approval — The flow sends the request to their manager and waits for a response.
    ‍
  3. Condition — If the manager approves, the flow continues. Otherwise, it stops.
    ‍
  4. Action — The flow sets automatic replies using the form’s dates and adds the backup contact to the message.
    ‍
  5. Follow-up — The flow posts in the team’s Teams channel so colleagues know who’s away.
a Power Automate flow that sets automatic replies after a leave request is approved
This image shows a Power Automate flow that sets automatic replies after a leave request is approved

Forms isn’t the only starting point. A calendar event or SharePoint list update can also trigger a flow. Conditions let you tailor messages by department or role, so sales replies name a backup and support replies link to the help desk. The same flow can also update the person’s Teams status and calendar.

Check one thing before building this for a whole team. Power Automate’s Outlook action sets replies for the mailbox connected to the flow. Test it on someone else’s mailbox before relying on it, and ask IT if your setup needs the flow to act for other people.

Where Power Automate fits next to PowerShell

Feature PowerShell Power Automate
Best for A company-wide closure or a one-off change across many mailboxes Individual absences that come up all year
How it runs Once, when you run the script Every time its trigger fires
Who sets it up An admin comfortable running commands Someone comfortable building flows
Effort after setup Edit the CSV and run it again None, unless the process changes

Many teams use both, with PowerShell for the December shutdown and Power Automate for vacations throughout the year. 

Writing out-of-office messages at scale

A bulk run sends your message from dozens of mailboxes, so any mistake gets repeated too. Writing it carefully once saves you from fixing it everywhere later. 

What every message needs

Anyone reading the reply should learn four things.

  • Their email arrived.
    ‍
  • How long the person is away.
    ‍
  • Who to contact meanwhile.
    ‍
  • When to expect a reply.

For bulk runs, I’d use one template and give the changing details their own CSV columns, including the return date and backup contact. That keeps every reply consistent and prevents a team’s backup name from being missed.

Internal vs external messages

These messages serve different purposes, so write them separately.

Internal replies help colleagues keep work moving. Be clear about who covers what.

"I'm away until January 4. Priya is covering client renewals, and Marco has access to the Q1 reports."

External replies go to customers, partners, and prospects. Keep them more formal and leave out internal details. That includes personal phone numbers, so use a shared inbox or main office number instead.

"Thank you for your email. I'm away until January 4. For anything time-sensitive, please contact our team at sales@company.com."

Leave jokes out of external replies. Something your team finds funny can seem careless to a customer seeing it for the first time.

Industry and cold outreach considerations

Some industries have extra requirements.

  • Financial services replies often need to mention delayed responses and provide a contact for urgent requests.
    ‍
  • Healthcare replies should never include patient details or specific locations.

If you send cold email, plan for responses too. A prospect replying to an absent rep’s sending mailbox is a warm lead. Point the external reply to a colleague who can continue the conversation, rather than leaving the lead waiting a week. 

Troubleshooting bulk out-of-office setups

Most problems show up in the first test run, so I’d start with two or three mailboxes. These are the ones I see most often. 

Problem Likely cause Fix
"Access denied" or permission errors The account running the script doesn't have the right role, or is relying on delegated permissions Run it from an account with Exchange Administrator or Global Administrator
Columns shift, or messages get cut off A comma or line break in a message broke the CSV Keep each message on one line, and let Excel wrap messages with commas in quotes when it saves
Accented letters or non-English text show up as symbols The file wasn't saved as UTF-8 Save the CSV and the script as UTF-8, then test with a sample email
People get two different replies A reply someone set by hand overlaps with the bulk one Turn off existing replies before the bulk run, and tell people a bulk reply is coming
The reply never turns off AutoReplyState was set to Enabled, so the dates were ignored Use Scheduled whenever you set StartTime and EndTime

After the full run, email a few mailboxes from internal and external addresses to check both messages. Keep the script’s log file too. If someone asks why their reply failed, you’ll know which mailboxes had problems and why.

Bulk out-of-office on Primeforge mailboxes

If your Microsoft 365 mailboxes come from Primeforge, automatic replies work the same way because these are real Microsoft 365 mailboxes. Their setup is different, though, and that affects how you plan bulk changes.

One tenant per domain

Primeforge uses one Microsoft 365 tenant per domain. That keeps domains separate, which is what you want for cold email. It also means a bulk change isn’t one run within one tenant. If your mailboxes span 10 domains, the script must run in 10 tenants, connecting to each separately.

Before planning a PowerShell run across Primeforge domains, ask support what admin access your Microsoft 365 tenants include. That determines whether you can use the script.

Setting replies without admin access

For a handful of mailboxes, you don’t need admin access. Primeforge has no separate mailbox login. Sign in to each mailbox through Microsoft using the credentials and one-time codes in Primeforge’s Credentials tab. Then set the reply in Outlook on the web under Settings, then Mail, then Automatic replies.

Start with the mailboxes that get replies

Not every sending mailbox needs an automatic reply. Primeforge’s Mailbox Analytics shows reply rates for each mailbox, so you can see which ones prospects answer. Set replies on those first, and direct external contacts to a colleague who can continue the conversation.

reply rates per mailbox in Primeforge Mailbox Analytics
This image shows reply rates per mailbox in Primeforge Mailbox Analytics
Personalized Outbound Strategy

Get The Right Outbound Strategy In Minutes

Enter your email to get a custom plan & stack recommendation for your business

It's being carefully crafted by AI

Please check your mailbox in 5 minutes

Conclusion: Set it up once, before the next holiday

Build your out-of-office setup during a quiet week, not the Thursday before a shutdown. Save the five-column CSV template, keep a test file with two or three mailboxes, and store the script alongside them. 

For the next closure, update the dates, test, and run the full list, taking minutes instead of an afternoon of clicking.

If you’re setting up Microsoft 365 mailboxes for cold outreach, Primeforge provides real Microsoft 365 mailboxes, configured automatically and ready to send in 30 minutes, with a separate tenant for each domain. 

Mailbox Analytics shows which mailboxes prospects answer, so you know where automatic replies should direct leads to a colleague.

Scale outreach with real Google and Microsoft inboxes

Set up Google Workspace and Microsoft 365 inboxes faster.
Start with
4.6 rating on G2
Add as a preferred
source on Google