Exchange Connection Problems

Find When POP or IMAP Was Enabled in Exchange Online with PowerShell

Nimra MalikNimra Malik Nov 13, 2026 868 views

Question details

Find the date when POP or IMAP was enabled or changed for an Exchange Online mailbox using PowerShell.

Find When POP or IMAP Was Enabled in Exchange Online with PowerShell
Product
Microsoft Exchange Online
Device & OS
not provided
Scenario
An administrator needs to investigate mailbox protocol changes when the Microsoft 365 audit portal is unavailable.
Observed behavior
The administrator needs audit records showing the time and parameters of relevant mailbox configuration commands.
Before you start

Use an account with permission to search the Microsoft 365 audit log, and install the Exchange Online PowerShell module if needed. Identify the mailbox and an approximate date range; results depend on audit availability and retention.

Solution 1Recommended

Search the Microsoft 365 audit log with PowerShell

Use this method to find recorded Exchange administrative commands that changed POP or IMAP settings.

1
Connect to Exchange Online

Open PowerShell and run `Connect-ExchangeOnline`. If the command is unavailable, install the module with `Install-Module ExchangeOnlineManagement` and then connect with an authorized account.

2
Search for configuration commands

Run `$records = Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-90) -EndDate (Get-Date) -RecordType ExchangeAdmin -Operations Set-CASMailbox,Set-CASMailboxPlan -ResultSize 5000`. Adjust the dates to cover the period you want to investigate.

3
Inspect the audit details

Run `$records | Select-Object CreationDate, Operations, AuditData | Format-List` and inspect `AuditData` for the target mailbox or mailbox plan and the `PopEnabled` or `ImapEnabled` parameter. A value of `True` indicates that the command enabled the corresponding protocol.

4
Check the scope of the change

Compare the record's `CreationDate` and command parameters with the mailbox you are investigating. A `Set-CASMailboxPlan` record concerns a mailbox plan, so it does not by itself prove that a particular existing mailbox was changed.

Search the Microsoft 365 audit log with PowerShell
If no matching record appears: The change may be outside the retained audit period, may not have been recorded, or may reflect a default rather than an explicit change. Narrow large searches by date; a single query is limited to 5,000 returned records.
Free Microsoft Office alternative

Review Exported Exchange Audit Results in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and compatibility with Microsoft Office formats, making it easy to migrate spreadsheet work. Use WPS Spreadsheets to review exported audit results; it does not connect to or search the Exchange audit log.

Review exported Exchange audit records in a spreadsheetOpen and edit Microsoft Excel XLSX files and CSV dataUse a familiar interface for spreadsheet tasksMove existing Office documents into a lightweight suite
microsoft office alternative - wps office

Frequently Asked Questions

How can I tell whether a command enabled POP or IMAP?

Inspect the audit record's command parameters for `PopEnabled` or `ImapEnabled`. A parameter value of `True` indicates that the command enabled that protocol; check the target mailbox and record date as well.

Why can't I find an older protocol change?

The record may be outside your organization's audit retention period, may not have been recorded, or may reflect a default setting rather than an explicit administrative change. Search a known date range and check your audit retention settings.

Does a mailbox plan change prove an existing mailbox was updated?

No. A `Set-CASMailboxPlan` record identifies a mailbox plan change. Check mailbox-specific `Set-CASMailbox` records and the mailbox's configuration before concluding that an existing mailbox changed.

What if Search-AdminAuditLog is unavailable?

Use `Search-UnifiedAuditLog` after connecting to Exchange Online PowerShell, provided your account has the required audit search permissions.