Exchange Online administration

How to bulk convert mailboxes to shared in Exchange Online

Convert mailboxes to shared with Exchange Online PowerShell from a CSV file, convert 1 at a time in the Microsoft 365 admin centre, or run the change on many mailboxes in Altivane.

By the Published

To bulk convert mailboxes to shared in Exchange Online, run Set-Mailbox -Type Shared for each mailbox in a CSV file, after exporting each mailbox's type and size as your backup. The conversion keeps the mail and calendar, but it does not remove the licence, and the person's old password keeps working until sign-in is blocked. Check each mailbox's size first: without a licence, a shared mailbox is limited to 50 GB.

Choose the method that fits the job
MethodBest fit
PowerShellMany mailboxes listed in a CSV file, with a backup of their types and a results file.
Admin centre1 or 2 mailboxes, converted 1 at a time.
AltivaneRecommended for bulk changes to items you choose from a list, with every result in a change log.

Before you start

Use an account in the Organization Management or Recipient Management role group, which Microsoft lists for mailbox settings. The examples change the tenant, so try them on 1 or 2 test mailboxes first. Keep the CSV the script writes before it changes anything: it is your record of each mailbox's type and size, and the list to convert back from.

A shared mailbox can hold 50 GB without a licence, and Exchange Online Plan 2 raises that to 100 GB. Litigation hold, and a larger archive, need Plan 2 or Plan 1 with the Exchange Online Archiving add-on. Do not delete the user's account: the shared mailbox needs it.

Option 1

Bulk convert mailboxes to shared with PowerShell

List the mailboxes in ./mailboxes.csv, with a Mailbox column. These rows are made up.

CSV
Mailbox
alex.morgan@example.com
sam.lee@example.com

Install the module once, then run the script. It exports each mailbox's type, size, litigation hold and archive status first, then converts the user mailboxes. Set-Mailbox has a -WhatIf switch, so the script previews until you change $preview to $false.

PowerShell
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser
PowerShell
$ErrorActionPreference = 'Stop'
$preview = $true   # Change to $false to make the changes.
$targets = @(Import-Csv -Path './mailboxes.csv')
if ($targets.Count -eq 0) { throw 'mailboxes.csv has no rows.' }
Connect-ExchangeOnline -ShowBanner:$false
try {
    # 1. The backup: each mailbox as it is now, written before any change.
    $backup = @(foreach ($target in $targets) {
        $address = "$($target.Mailbox)".Trim()
        $row = [pscustomobject]@{
            Mailbox = $address; Type = ''; Size = ''
            LitigationHold = ''; Archive = ''; Error = ''
        }
        try {
            if (-not $address) { throw 'The Mailbox cell is blank.' }
            $properties = 'LitigationHoldEnabled', 'ArchiveStatus'
            $mailbox = Get-EXOMailbox -Identity $address -Properties $properties
            $statistics = Get-EXOMailboxStatistics -Identity $address
            $row.Type = $mailbox.RecipientTypeDetails
            $row.Size = $statistics.TotalItemSize.ToString()
            $row.LitigationHold = $mailbox.LitigationHoldEnabled
            $row.Archive = $mailbox.ArchiveStatus
        } catch {
            $row.Error = $_.Exception.Message
        }
        $row
    })
    $backup | Export-Csv -Path './mailbox-types-before.csv' -NoTypeInformation -Encoding utf8

    # 2. Convert user mailboxes only. One failure does not stop the others.
    $results = @(foreach ($row in $backup) {
        try {
            if ($row.Error) { throw $row.Error }
            if ($row.Type -eq 'SharedMailbox') {
                $result = 'Already shared'
            } elseif ($row.Type -ne 'UserMailbox') {
                $result = "Skipped: a $($row.Type) is not converted here"
            } else {
                Set-Mailbox -Identity $row.Mailbox -Type Shared -WhatIf:$preview | Out-Null
                $result = if ($preview) { 'Would convert' } else { 'Converted' }
            }
        } catch {
            $result = "Failed: $($_.Exception.Message)"
        }
        [pscustomobject]@{ Mailbox = $row.Mailbox; WasType = $row.Type; Result = $result }
    })
    $results | Export-Csv -Path './mailbox-convert-results.csv' -NoTypeInformation -Encoding utf8
    $failed = @($results | Where-Object { $_.Result -like 'Failed*' }).Count
    Write-Output "$($results.Count) mailboxes processed, $failed failed."
} finally {
    Disconnect-ExchangeOnline -Confirm:$false
}

Run it as it is first: mailbox-convert-results.csv says Would convert for each mailbox that would change. In the backup, look at any mailbox near 50 GB, on litigation hold or with an archive, since each can need a licence once shared. Then set $preview to $false and run it again. Mailboxes already shared are left alone, and room and equipment mailboxes are skipped.

Option 2

Convert a mailbox to shared in the admin centre

  1. Sign in to the Microsoft 365 admin centre for the correct tenant.
  2. Go to Users > Active users and select the user.
  3. On the Mail tab, select Convert to shared mailbox, then Convert.
  4. If the mailbox is smaller than 50 GB, you can remove the user's licence. Do not delete the user.

Microsoft's steps convert 1 user at a time, so this suits 1 or 2 mailboxes, such as test accounts. The option appears only while the user has a licence.

Common questions

Does converting a mailbox remove its licence?

No. The licence stays until you remove it, which Microsoft says you can do once the mailbox is under 50 GB. A shared mailbox on litigation hold keeps needing one, as does a larger archive.

How do I convert a mailbox back?

Run Set-Mailbox -Identity person@example.com -Type Regular, or select the shared mailbox in the Exchange admin centre and choose Convert to regular mailbox. Microsoft's steps then assign a licence to the account and reset its password. In Altivane, run Convert mailbox type again, set to convert to Regular. The backup CSV and the change log both record each mailbox's original type.

Should the old account still be able to sign in?

No. Microsoft says to block sign-in for a shared mailbox's account and keep it blocked; the person's original password keeps working unless it is reset. To see which shared mailboxes can still sign in, see how to check shared mailbox sign-in.

Microsoft references

Technical references checked on 20 October 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us