Skip to main content

Identify non-migratable mailbox folders with PowerShell

Use a PowerShell script to find mailbox folder types that ShareGate Migrate cannot detect or migrate.

Updated today

Some mailbox folder types use custom folder classes (such as IPF.Imap or IPF.SkypeTeams.Message) that ShareGate Migrate cannot detect. These folders are completely invisible to the app and will not appear in your migration report.

This can also happen with renamed system folders. For example, if a user renamed the Conversation History folder in Outlook, it still retains its original container class — making it invisible to ShareGate with no mention in the migration report.

You can use the Get-NonMigratableMailboxFolders.ps1 script to identify these folders before or after a migration so you can assess any gaps in coverage.

Prerequisites

  • Windows PowerShell (using the command prompt is recommended for best results)

  • Access to the source mailbox with Exchange Online permissions

Run the script

Copy the script below and save it as Get-NonMigratableMailboxFolders.ps1, then run it from the command prompt.

param(
# Change this to the mailbox you want to scan
[Parameter(Mandatory = $true)]
[string]$Mailbox,

# Optional: provide a file path to also export the results as a CSV
[Parameter(Mandatory = $false)]
[string]$CsvOutputPath
)

$ErrorActionPreference = 'Stop'

$ModuleName = "ExchangeOnlineManagement"
$RequiredVersion = "3.9.0"

$module = Get-Module -ListAvailable -Name $ModuleName | Where-Object { $_.Version -eq [Version]$RequiredVersion }

if (-not $module) {
Install-Module -Name $ModuleName -RequiredVersion $RequiredVersion -Scope CurrentUser -Force
}

Import-Module -Name $ModuleName -RequiredVersion $RequiredVersion -Force

Connect-ExchangeOnline -ShowBanner:$false

try {
Write-Host "Scanning mailbox: $Mailbox" -ForegroundColor Cyan

$folders = Get-MailboxFolderStatistics -Identity $Mailbox |
Select-Object Name, FolderPath, FolderType, ContainerClass

# ShareGate manages the following folder types via dedicated migration paths:
# - IPF.Note / IPF.Note.* : email folders (main mailbox migration)
# - IPF.Appointment / IPF.Appointment.* : calendar folders (calendar migration)
# - IPF.Contact / IPF.Contact.* : contact folders (contacts migration)
# - IPF.Task / IPF.Task.* : task folders (tasks migration)
# All other container classes — such as IPF.Imap, IPF.SkypeTeams.Message, IPF.Files, etc. — are invisible to ShareGate.
$nonDetectable = @($folders | Where-Object {
$class = $_.ContainerClass
-not (
[string]::IsNullOrEmpty($class) -or
$class -eq 'IPF.Note' -or $class -like 'IPF.Note.*' -or
$class -eq 'IPF.Appointment' -or $class -like 'IPF.Appointment.*' -or
$class -eq 'IPF.Contact' -or $class -like 'IPF.Contact.*' -or
$class -eq 'IPF.Task' -or $class -like 'IPF.Task.*'
)
})

if ($nonDetectable.Count -eq 0) {
Write-Host "No non-detectable folders found." -ForegroundColor Green
}
else {
Write-Host "`nFolders that will NOT be detected by ShareGate ($($nonDetectable.Count) found):" -ForegroundColor Yellow
$nonDetectable | Format-Table Name, FolderPath, FolderType, ContainerClass -AutoSize
}

if ($CsvOutputPath) {
$nonDetectable | Export-Csv -LiteralPath $CsvOutputPath -NoTypeInformation -Encoding UTF8
Write-Host "Report exported to: $CsvOutputPath" -ForegroundColor Green
}
}
finally {
Disconnect-ExchangeOnline -Confirm:$false
}

To print non-migratable folders to the console:

.\Get-NonMigratableMailboxFolders.ps1 -Mailbox "[email protected]"

To export results to a CSV file:

.\Get-NonMigratableMailboxFolders.ps1 -Mailbox "[email protected]" -CsvOutputPath "C:\Reports\non-migratable-folders.csv"

Note: The script only flags folders whose container class falls outside ShareGate's supported migration categories: email (IPF.Note), calendar (IPF.Appointment), contacts (IPF.Contact), and tasks (IPF.Task). Folders in these categories — including ConversationHistory, Clutter, SyncIssues, Conflicts, LocalFailures, ServerFailures, RecoverableItemsDeletions, and SearchFolders — are already detected by ShareGate Migrate and will appear as skipped in the migration report.

Troubleshooting

Module install error

If you see an error when the script tries to install the ExchangeOnlineManagement module, open the script in a text editor and add -AllowClobber to the Install-Module line:

Install-Module -Name $ModuleName -RequiredVersion $RequiredVersion -Scope CurrentUser -Force -AllowClobber
Did this answer your question?