01Overview
CCI.NET Mailbox Maintenance is a PowerShell GUI tool for Microsoft 365 administrators. It performs bulk mail operations, security audits, duplicate detection and forensic investigations against Exchange Online mailboxes using the Microsoft Graph API. All API calls go directly between the tool and Microsoft. No data passes through any third-party server.
Features at a glance
| Feature | Description |
|---|---|
| Delete | Permanently remove email from any folder. 8 parallel threads, about 25 seconds per 1,000 items. |
| Move to Mailbox | Move email to another mailbox, preserving original timestamps via MAPI extended properties. |
| Copy to Mailbox | Copy email to another mailbox, leaving the originals intact. |
| Archive ALL Mail | Move every folder in a mailbox to a destination in one operation. |
| Search & Delete | KQL-based search and permanent delete. Re-searches until 0 results remain. |
| Duplicate Finder | Find and remove duplicate email, contacts and calendar events. Dry run by default. |
| Folder Size Report | All folders with item counts, as a sortable HTML report. |
| Hold Status Check | Litigation and retention hold indicators. |
| Forward & Delegate Audit | Inbox rules, hidden MAPI rules, admin SMTP forwarding and calendar delegates. |
| Company-Wide Bulk Audit | Scan every mailbox in the tenant for forwarding, holds or folder counts. |
| Email Timeline Audit | Complete email activity for a mailbox in a date window. Three source modes. |
| OAuth App Audit | All OAuth2 apps and their permissions. Flags risky scopes. |
| External Forwarding Domains | Tenant-wide forwarding destinations grouped by domain. |
| Attachment Inventory | All attachments in a date window. Flags dangerous file types. |
| Sign-in Anomaly Report | Entra ID sign-in log with risk flagging. |
| Permission Snapshot | All calendar delegates and mailbox sharing permissions. |
| Suspicious Rule Detector | Scores every inbox rule for risk. Detects hidden MAPI rules. |
This is an IT administrator tool. All operations are logged to a CSV file. Destructive operations require confirmation before they run.
Requirements
- A Windows PC with PowerShell, where you can run the script.
- A Microsoft 365 tenant and an administrator who can create an Entra ID app registration and grant admin consent.
- Optional licensing for some features: Microsoft Defender for Office 365 Plan 1 or 2 (Message Trace) and Entra ID P1 or P2 (Sign-in Anomaly Report).
02Entra app registration
The tool authenticates through an Entra ID app registration using client credentials (app-only authentication). This is a one-time setup per tenant.
Required permissions
| Permission | Type | Required for |
|---|---|---|
Mail.ReadWrite | Microsoft Graph, Application | All mail operations and all Audit & Reports features |
User.ReadBasic.All | Microsoft Graph, Application | Company-Wide Audit, Forwarding Report, Permission Snapshot |
Application.Read.All | Microsoft Graph, Application | OAuth App Audit |
AuditLog.Read.All | Microsoft Graph, Application | Sign-in Anomaly Report |
ThreatHunting.Read.All | Microsoft Graph, Application | Message Trace (requires Defender for Office 365 Plan 1 or 2) |
All permissions require admin consent. Without it, every API call returns 403 Forbidden.
Mail.ReadWrite is the only permission needed for all mail operations and single-mailbox audits. Add the others as you need them.
Create the app registration
- Open the Entra admin center at https://entra.microsoft.com.
- Go to Identity → Applications → App registrations → New registration.
- Fill in the form:
Field Value Name CCI-MailboxMaintenanceSupported account types Accounts in this organizational directory only Redirect URI Leave blank - Click Register.
Grant API permissions
- Click API permissions → Add a permission → Microsoft Graph → Application permissions.
- Search for and add each permission you need from the table above.
- Click Grant admin consent for [Tenant].
Every permission must show a green checkmark after you grant admin consent.
Create a client secret
- Click Certificates & secrets → New client secret.
- Enter a description, set a 24-month expiry and click Add.
- Copy the secret Value immediately.
The secret Value is shown only once. If you navigate away before copying it, it is gone and you must create a new secret.
Your three credential values
| Value | Where to find it |
|---|---|
| Tenant ID | App Overview page → Directory (tenant) ID |
| Client ID | App Overview page → Application (client) ID |
| Client Secret | The Value you copied when creating the secret |
03Installation and first launch
- Save the script to
C:\scripts\CCI_MailboxMaintenance.ps1. - Unblock the file and set the execution policy. Run these once, as Administrator:
Unblock-File -Path C:\scripts\CCI_MailboxMaintenance.ps1 Set-ExecutionPolicy -Scope CurrentUser RemoteSigned - Launch the tool from
C:\scripts:.\CCI_MailboxMaintenance.ps1 - Go to the Connection tab, enter or load your credentials and click Connect & Test. A green Connected message confirms success.
The ? Help button at the top right of the title bar opens the PDF guide. For it to work, place CCI_MailboxMaintenance_Guide.pdf in the same folder as the script (C:\scripts\).
04Credential profiles
The profile bar at the top of every window saves tenant credentials under a named profile. Profiles are encrypted with Windows DPAPI and cannot be read outside the user account and machine that saved them.
Profile bar controls
| Control | Description |
|---|---|
| Saved Profile dropdown | Lists all saved profiles. |
| Load | Fills Tenant ID, Client ID and Client Secret from the selected profile. |
| Save As... | Prompts for a profile name and saves the current credentials. |
| Delete | Removes the selected profile after confirmation. |
Typical workflow
- First time: paste the Tenant ID, Client ID and Client Secret into the Connection tab.
- Click Save As... and name the profile after the organization (for example
Fabrikam). - Every later session: select the profile, click Load, then Connect & Test.
Profile security
- Profiles are stored in
C:\scripts\CCI_MailboxMaint_Profiles.json. Tenant ID and Client ID are stored as plain text. The Client Secret is DPAPI-encrypted. - A profile copied to another machine or user account will fail to decrypt. This is by design.
- To revoke access, delete the client secret in Entra. The saved profile then becomes harmless.
05Connection tab
The Connection tab is the first tab in the window. It holds the credential fields, a Quick Start guide and a permission reference. Connect here before using any other tab.
Fields
| Field | Description |
|---|---|
| Tenant ID | The Directory (tenant) ID from the Entra app Overview page. |
| Client ID | The Application (client) ID from the Entra app Overview page. |
| Client Secret | The client secret Value created in Entra. Displayed as asterisks. |
Connect & Test
Connect & Test acquires a Bearer token and verifies Graph API access. On success it shows Connected ✓ (token valid until HH:MM:SS).
| Status | Meaning |
|---|---|
| Token lifetime | 1 hour. Refreshed automatically 3 minutes before expiry during long operations. |
| Connected ✓ | Credentials are valid and admin consent is granted. |
| Connection failed | A credential is wrong or admin consent has not been granted. See the Troubleshooting tab. |
06Mail Operations tab
The Mail Operations tab is the main action screen. It has three sections: SOURCE, OPERATION and DESTINATION.
SOURCE controls
| Control | Description |
|---|---|
| Mailbox | Source mailbox email address. |
| Multiple Mailboxes (bulk) | Check to process multiple mailboxes. Paste addresses one per line or load them from CSV. |
| Folder | The folder to process. Enter a well-known name or the exact display name. |
| ▾ Select | Opens a folder picker listing every folder in the source mailbox with item counts. Click a folder to fill in the Folder field. |
| All Mail Folders | Process every mail folder. Hides the Folder field. Works with Delete, Move, Copy and Archive ALL. |
| Received Before | Date picker. Only items received before this date are processed. Defaults to 3 years ago. |
| All items (no date filter) | Ignore the date filter and process every item regardless of age. |
Well-known folder names
| Short name | Folder |
|---|---|
inbox | Inbox |
deleteditems | Deleted Items |
sentitems | Sent Items |
drafts | Drafts |
junkemail | Junk Email / Spam |
archive | Online Archive |
outbox | Outbox |
recoverableitemsdeletions | Recoverable Items / Deletions |
For subfolders not in this list, type the exact display name as shown in Outlook. Use ▾ Select to browse and avoid typos.
Delete (permanent)
Permanently removes matching items. Items do not go to Deleted Items; they are gone immediately. Delete uses 8 parallel threads.
| Volume | Estimated time |
|---|---|
| 1,000 items | ~25 seconds |
| 10,000 items | ~4 minutes |
| 50,000 items | ~20 minutes |
| 100,000 items | ~40 minutes |
Delete is permanent and cannot be undone. A confirmation dialog appears before it runs. Check the folder and date filter carefully.
Move to Mailbox
Moves matching items to another mailbox. A cross-mailbox transfer takes three API calls per message: GET from the source, POST to the destination (preserving timestamps via MAPI extended properties), then DELETE the original. The thread count is adjustable.
| Volume | Estimated time (3 threads) |
|---|---|
| 1,000 items | ~5–8 minutes |
| 10,000 items | ~50–80 minutes |
| 50,000 items | ~4–7 hours |
The Graph API's built-in /move endpoint only works within the same mailbox. Cross-mailbox transfer always requires the three-step GET + POST + DELETE approach.
Throttling responses (HTTP 429) are handled automatically. The tool reads the Retry-After header and waits. No items are skipped.
Move deletes each original from the source mailbox after it is copied. If you want a safety net, run Copy to Mailbox first to create a backup.
Copy to Mailbox
Works like Move to Mailbox, but the originals stay in the source folder. Use it to create a backup before a destructive operation, or to copy content to a shared mailbox.
Archive ALL Mail
Enumerates every mail folder recursively and moves all contents to the destination mailbox. Calendar, Contacts, Tasks and Notes folders are skipped automatically. Use it for full mailbox offboarding.
With Preserve folder structure checked, Archive ALL recreates the complete source folder hierarchy at the destination.
Search & Delete
Searches for items matching a KQL query and permanently deletes every match. The search repeats until 0 results remain. Example queries:
from:sender@example.com
subject:"Invoice" AND has:attachment
received>=2024-01-01 AND received<2024-06-01
Search & Delete is permanent. Test your KQL query in Outlook on the web before you run it.
DESTINATION panel
Appears automatically for Move, Copy and Archive ALL.
| Control | Description |
|---|---|
| Dest Mailbox | Target mailbox email address. |
| Dest Folder | Target folder in the destination mailbox. Hidden when Preserve folder structure is checked. |
| Preserve folder structure | Creates matching folders in the destination. When checked together with All Mail Folders and a blank Dest Folder, it recreates the entire source folder tree at the root of the destination mailbox. |
Thread count
The Threads spinner (1–8, default 3) controls Move and Copy parallelism. Lower is safer on busy tenants; higher is faster for large operations when traffic is light.
Run, Stop and Clear Log
| Button | Description |
|---|---|
| Run | Starts the operation. Disabled while it runs. |
| Stop | Halts after the current batch. Run again to resume; items already processed won't match again. |
| Clear Log | Clears the on-screen log. Does not affect the CSV log on disk. |
Status bar
The dark bar at the bottom of the window shows live status:
▶ RUNNING 14m 22s | 250 Moved — Inbox(updates every 3 seconds)✓ COMPLETE — Elapsed: 2h 14m 33s⏹ STOPPED — Elapsed: 19m 47sReady.(idle)
07Audit & Reports tab
Every audit produces an HTML report that opens automatically in your default browser and is saved to C:\scripts\. The CSV log captures all findings.
Single-mailbox audits. Enter a mailbox address in the Mailbox field at the top of the tab, then click the audit you want.
Folder Size Report
Lists every mail folder with its item count and unread count in a sortable HTML table. Folders over 10,000 items are highlighted amber. Run this first, before any bulk operation, to understand the mailbox's volume.
Hold Status Check
Checks the Recoverable Items size as an indicator of litigation or retention hold. For definitive status, use Exchange Online PowerShell:
Get-Mailbox user@example.com | Select LitigationHoldEnabled,RetentionHoldEnabled
Forward & Delegate Audit
| Area | What is checked |
|---|---|
| Inbox rules | All rules with forwardTo, redirectTo or forwardAsAttachmentTo actions. |
| Hidden MAPI rules | Rules invisible in the Outlook interface, detected with an IPM.Rule.Message class filter. |
| Admin SMTP forwarding | forwardingSmtpAddress set by an Exchange administrator. |
| Calendar delegates | All calendar permission entries with write or delegate access. |
Hidden MAPI rules are a strong indicator of account compromise. Reset the password and revoke sessions (Entra → Revoke sessions) immediately.
Company-Wide Bulk Audit
Scans every licensed mailbox in the tenant. Requires User.ReadBasic.All. Only mailboxes with findings are shown on screen; clean mailboxes are logged to CSV.
| Scan mode | What it does |
|---|---|
| Forward & Rule Scan | Checks every mailbox for forwarding rules, redirect rules, hidden MAPI rules and admin SMTP forwarding. |
| Hold Status Scan | Finds mailboxes with a high Recoverable Items count. |
| Folder Count Summary | Quick item count per mailbox for capacity reporting. |
Large tenants (1,000+ mailboxes) can take 30–90 minutes. Stopping is safe: results are written to CSV continuously.
Email Timeline Audit
Shows the complete email activity for a mailbox in a date window. Choose one of three source modes:
| Mode | Description |
|---|---|
| Mailbox Contents | Searches the folders currently in the mailbox. Fast, and needs only Mail.ReadWrite. |
| Message Trace | Queries Defender EmailEvents and shows everything, including blocked and deleted messages. Requires ThreatHunting.Read.All. |
| Message Trace Extended | Same as Message Trace with a longer lookback (up to 90 days). Slower. |
Options: Start/End Date, Start/End Time, Timezone (default Pacific Standard Time), Received / Sent / Deleted checkboxes, and All Mail Folders.
For incident response, use Message Trace. It shows everything Exchange processed, including messages that were delivered and then deleted by an attacker.
08Duplicate Finder tab
Scans a mailbox for duplicate email messages, contacts or calendar events. Dry Run is checked by default, so the first run always produces a report only, with nothing deleted.
Always back up Contacts and Calendar to a PST file before a live deletion: Outlook → File → Open & Export → Import/Export → Export to a file → Outlook Data File (.pst).
Mode selection
| Mode | What it scans |
|---|---|
| Email Messages | Mail folders, for duplicate messages. |
| Contacts | The Contacts folder, for duplicate contact entries. |
| Calendar Events | The Calendar, for duplicate events. Recurring master records are skipped. |
Email controls
Shown in Email Messages mode.
| Control | Description |
|---|---|
| Folder + ▾ Select | Which mail folder to scan. The browse button lists all folders with item counts. |
| All Mail Folders | Scan every mail folder for duplicates. |
| Match By: Message-ID | Match on internetMessageId, the RFC 2822 message identifier. Exact and safe. |
| Match By: Subject+Sender+Date | Match on subject, sender and received date. More aggressive; may catch migration artifacts. |
Workflow
- Enter the mailbox address, select a mode and confirm Dry Run is checked.
- Click Scan for Duplicates. The tool scans and groups items by match key.
- An HTML report opens showing total scanned, groups found, items to delete, and a 50-group sample (green = KEEP, red = WOULD DELETE).
- A CSV file is written with every group. Review it in Excel to confirm the pattern looks right before going further.
- If you are satisfied, uncheck Dry Run and click Scan for Duplicates again to delete.
How duplicates are resolved
Within each duplicate group the oldest item (earliest received or created date) is kept and all others are deleted.
- Contacts are grouped by email address, or by display name if there is no email address.
- Calendar events are grouped by subject + organizer + start date/time.
Calendar and contact deletions cannot be undone from this tool. Always export to PST first.
09Security Investigations tab
Six forensic audit tools for breach response, designed to answer three questions: how did the attacker get in, what did they do, and how are they keeping access?
After a suspected breach, run the tools in this order: OAuth App Audit → Suspicious Rule Detector → External Forwarding Domains → Sign-in Anomaly Report → Attachment Inventory → Permission Snapshot.
Shared controls
| Control | Description |
|---|---|
| Mailbox | The mailbox to investigate. Leave blank for tenant-wide operations. |
| Start Date / End Date | Date range for Attachment Inventory and the Sign-in Anomaly Report. |
| Timezone | Time zone used to display timestamps in reports. |
OAuth App Audit
Lists every third-party application granted OAuth2 permissions in the tenant. Attackers often register malicious OAuth apps to keep access even after a password reset. Requires Application.Read.All.
- Apps with
Mail.ReadorMail.ReadWritescopes are flagged red. - Unverified publishers are flagged. Legitimate apps are almost always verified.
Investigate any unverified app with Mail.ReadWrite scope that you don't recognize, and revoke it in Entra → Enterprise Applications.
External Forwarding Domains
Scans every mailbox for inbox rules that forward externally and for admin SMTP forwarding. Results are grouped by destination domain. Domains that 5 or more mailboxes forward to are highlighted red. Requires User.ReadBasic.All.
An unrecognized domain appearing as a forwarding destination across multiple mailboxes indicates a coordinated attack.
Attachment Inventory
Lists all attachments received in a date window, with filename, type, size, sender and subject. Dangerous file types (EXE, ZIP, JS, PS1, BAT, VBS, CMD, HTA, SCR, PIF) are flagged red. Files over 5 MB are highlighted for exfiltration review.
Sign-in Anomaly Report
Shows the Entra ID sign-in log for a mailbox in a date window. It surfaces failed attempts, high-risk events, sign-ins from unusual countries and login storms. Requires AuditLog.Read.All and Entra ID P1 or P2.
Sign-ins from countries the user has never worked from, or dozens of failed attempts followed by a success, are strong indicators of a password spray attack.
Mailbox Permission Snapshot
Exports all calendar delegates and mailbox sharing permissions across every mailbox. Run it before and after a suspected breach to spot delegate access added by an attacker. Requires User.ReadBasic.All.
Suspicious Rule Detector
Evaluates every inbox rule and assigns it a risk score. It also detects hidden MAPI rules that are invisible in Outlook and in the standard Graph API.
Scoring criteria
| Criterion | Score |
|---|---|
Forwards externally (forwardTo with an external address) | +40 |
Redirects externally (redirectTo with an external address) | +40 |
| Forwards as attachment to an external address | +35 |
| Permanently deletes messages | +50 |
| Moves to Deleted Items / auto-deletes | +30 |
| Moves to a custom folder | +10 |
| Rule is system-locked | +20 |
| Rule has no display name | +15 |
| Subject targets executive keywords (ceo, cfo, payroll, wire, invoice) | +25 |
| Hidden MAPI rule (invisible in Outlook) | 99, always HIGH |
Risk levels
| Risk level | Score | Action |
|---|---|---|
| HIGH | ≥ 40 | Investigate immediately. Very likely malicious. |
| MEDIUM | 20–39 | Review. Suspicious, but may be legitimate. |
| LOW | < 20 | Note for awareness. |
A rule that forwards externally and also deletes the original scores 70. This is a classic attacker pattern for silent email exfiltration.
10Troubleshooting tab
Permission Checker
Click Run Permission Check to verify every permission with live API calls, not just by checking what is listed in Entra. The check runs in a background thread so the window stays responsive.
| Status | Meaning |
|---|---|
| Green: OK | Permission granted and the API call succeeded. |
| Red: MISSING | 403 Forbidden. The permission is not granted or admin consent was not clicked. |
| Yellow: ERROR | Unexpected error. Check the Detail column. |
Reconnect & Recheck
Acquires a fresh Bearer token and immediately reruns all permission tests. Use it every time you add or change a permission in Entra.
Entra permission changes can take 1–5 minutes to propagate. If a permission still shows MISSING after Reconnect, wait 2 minutes and try again.
Permission reference
| Permission | Required for |
|---|---|
Mail.ReadWrite | All mail operations and all Audit & Reports features |
User.ReadBasic.All | Company-Wide Audit, Forwarding Report, Permission Snapshot |
Application.Read.All | OAuth App Audit |
AuditLog.Read.All | Sign-in Anomaly Report |
ThreatHunting.Read.All | Message Trace (requires Defender for Office 365 Plan 1 or 2) |
Common errors and fixes
| Symptom | Resolution |
|---|---|
| Not connected — check credentials | Re-check all three values in Entra, or reload a saved profile. |
| 401 Unauthorized | Click Connect & Test to get a fresh token. |
| 403 Forbidden | Admin consent not granted. Entra → API permissions → Grant admin consent. |
| 404 Not Found on a folder | The folder name is wrong. Use ▾ Select to browse exact names. |
| Id is malformed / 400 | Make sure you are running the current release. |
| Move stops after 1 hour | Fixed in current releases: automatic token refresh keeps long operations running. Update if you see this. |
| Throttled (429) repeatedly | Normal. The tool waits for Retry-After automatically. Stop only if it has been stuck for 10+ minutes. |
| No progress for 5+ minutes | The 5-minute timeout fires, logs a warning, breaks the thread pool and continues. Check the log and run again. |
| Search returns 0 results | Test the KQL query in Outlook on the web first. |
| Company-Wide Audit finds 0 mailboxes | User.ReadBasic.All missing, or admin consent not granted. |
| Email Timeline shows 0 messages | Check the date range and time zone. Verify in Outlook on the web. |
| Null item error on startup | Remove null entries from C:\scripts\CCI_MailboxMaint_Profiles.json. |
| Script won't launch | Run Unblock-File -Path C:\scripts\CCI_MailboxMaintenance.ps1, then Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. |
| OAuth App Audit returns 403 | Application.Read.All missing. |
| Sign-in Anomaly returns 403 | AuditLog.Read.All missing, or Entra ID P1/P2 not licensed. |
| Bulk audit buttons show black text | Display issue in older builds. Update to the current release. |
| Folder browse (▾ Select) fails | Click Connect & Test before using ▾ Select. |
11Performance and throttling
Performance summary
| Operation | Threads | Speed estimate |
|---|---|---|
| Delete | 8 | ~25 seconds per 1,000 items |
| Move/Copy cross-mailbox | 1–8 | ~3 messages/second at 3 threads |
| Archive ALL Mail | 1–8 | Same as Move/Copy, per folder |
| Folder Size Report | — | ~5–10 seconds per mailbox |
| Company-Wide Audit | — | 30–90 minutes for large tenants |
| Email Timeline | 1 | ~1–2 seconds per page of 1,000 |
| Duplicate Finder | 1 | ~1–2 seconds per page of 1,000 |
| Token auto-refresh | Auto | Transparent, 3 minutes before expiry |
Throttling
- HTTP 429 (Too Many Requests) is handled automatically. The tool reads
Retry-Afterand pauses. No items are skipped. - Microsoft can return
Retry-Aftervalues of 30–120 seconds on large operations against busy tenants. - If there is no progress for 5 minutes, a stuck-thread safeguard fires: it logs a warning and breaks the thread pool so processing continues with the next page.
- A 30-minute hard timeout per page prevents infinite hangs.
Resuming after Stop
If you stop a Move and run it again with the same settings, the items already moved are no longer in the source folder. The date filter applies to the source only, so nothing is processed twice.
12Security and logs
Security considerations
- The Client Secret is held in memory only during the session. The script never writes it to disk in plain text.
- The profile file stores the Client Secret DPAPI-encrypted, readable only by the same Windows user on the same machine.
Mail.ReadWritegrants access to every mailbox in the tenant. Treat credential profiles like a Global Admin password.- Rotate the client secret annually, or whenever a team member with access leaves.
- To revoke access immediately, delete the app registration or disable the secret in Entra.
Because Mail.ReadWrite covers every mailbox in the tenant, anyone holding a working profile can read and change any mailbox. Protect the PC and user account where profiles are saved.
Logs and files
| File | Location |
|---|---|
| Script | C:\scripts\CCI_MailboxMaintenance.ps1 |
| Credential profiles | C:\scripts\CCI_MailboxMaint_Profiles.json |
| Operations log (CSV) | C:\scripts\CCI_MailboxMaint_Log.csv |
| HTML audit reports | C:\scripts\ |
| Help PDF (optional) | C:\scripts\CCI_MailboxMaintenance_Guide.pdf |
The CSV log may contain sensitive mailbox data. Restrict access to it and back it up regularly.
Exchange Online reference commands
Useful Exchange Online PowerShell commands for confirming what the tool reports:
Connect-ExchangeOnline -UserPrincipalName admin@example.com
Get-Mailbox user@example.com | Select LitigationHoldEnabled,RetentionHoldEnabled
Get-MailboxPermission user@example.com | Where { $_.AccessRights -eq 'FullAccess' }
Get-InboxRule -Mailbox user@example.com | Select Name,Enabled,ForwardTo,DeleteMessage
Get-MailboxFolderStatistics user@example.com | Select Name,ItemsInFolder | Sort ItemsInFolder -Desc
13Quick reference
| Item | Value / action |
|---|---|
| Script filename | CCI_MailboxMaintenance.ps1 |
| Launch command | .\CCI_MailboxMaintenance.ps1 |
| Unblock on first run | Unblock-File -Path C:\scripts\CCI_MailboxMaintenance.ps1 |
| Profile file | C:\scripts\CCI_MailboxMaint_Profiles.json |
| CSV log | C:\scripts\CCI_MailboxMaint_Log.csv |
| Entra admin center | https://entra.microsoft.com |
| After adding an Entra permission | Troubleshooting → Reconnect & Recheck |
| Check permissions live | Troubleshooting → Run Permission Check |
| Browse source folder | Click ▾ Select next to the Folder field |
| All Mail Folders | Checkbox in SOURCE; hides the Folder field |
| Received Before | Date picker in SOURCE |
| All items (no filter) | Checkbox next to the date picker |
| Preserve folder structure | Checkbox in DESTINATION; hides the Dest Folder field |
| Dest Folder optional when… | All Mail Folders and Preserve folder structure are both checked (creates at mailbox root) |
| Thread count | Threads spinner, 1–8, default 3 (Move/Copy only) |
| Delete speed | ~25 seconds per 1,000 items (8 threads) |
| Cross-mailbox move speed | ~3 messages/second (3 threads, 3 API calls each) |
| Token auto-refresh | Automatic, 3 minutes before expiry |
| Duplicate Finder dry run | Checked by default; report only, nothing deleted |
| Backup before duplicate delete | Outlook → File → Open & Export → Export to .pst |
| Suspicious rule HIGH | ≥ 40 points; investigate immediately |
| Hidden MAPI rule score | 99 points; always HIGH, invisible in Outlook |
| Stop any operation | Click Stop; safe between batches |
| Resume after Stop | Run again with the same settings; processed items won't match |
| Status bar | Bottom of window: ▶ RUNNING / ✓ COMPLETE / ⏹ STOPPED |
| Help button | ? at the top right of the title bar; opens the PDF guide |
| Rotate client secret | Entra → App registrations → Certificates & secrets → New client secret |
14Getting help
Questions, bug reports, feature requests or a copy of the tool: email info@taucher.llc. You'll reach the people who wrote the software.