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.
| Method | Best fit |
|---|---|
| PowerShell | Many mailboxes listed in a CSV file, with a backup of their types and a results file. |
| Admin centre | 1 or 2 mailboxes, converted 1 at a time. |
| Altivane | Recommended 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., with a Mailbox column. These rows are made up.
Mailbox
alex.morgan@example.com
sam.lee@example.comInstall 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.
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser$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. 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
- Sign in to the Microsoft 365 admin centre for the correct tenant.
- Go to Users > Active users and select the user.
- On the Mail tab, select Convert to shared mailbox, then Convert.
- 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.
Option 3 ยท Recommended for bulk changes with a record of each result
Bulk convert mailboxes to shared with Altivane
- Open Altivane and choose the tenant.
- Choose the mailboxes in Altivane's list of them, then the Convert mailbox type change. In its window, set it to convert to Shared. The window shows the mailboxes it applies to and the tenant.
- Run it from that window. Altivane reads each mailbox first. As it goes, it warns where a mailbox has litigation hold, an archive or more than 50 GB, since those can need a licence once shared. A mailbox that is already shared shows No change, and one that cannot be converted is refused with its type. The result for each mailbox is written to the change log.
The change log is a CSV file for the tenant with a row for each mailbox: the time, who signed in, the command, the result, and the mailbox type before and after. For one leaver, the Offboard a Leaver sample workflow converts the mailbox as one step, then gives the manager Full Access, sets an automatic reply, hides the mailbox and removes the leaver from groups.
Contact usCommon 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., 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.