Find When POP or IMAP Was Enabled in Exchange Online with PowerShell
Question details
Find the date when POP or IMAP was enabled or changed for an Exchange Online mailbox using 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.
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.
Search the Microsoft 365 audit log with PowerShell
Use this method to find recorded Exchange administrative commands that changed POP or IMAP settings.
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.
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.
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.
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 Exchange admin audit log where available
Use this approach if the legacy Exchange admin audit log cmdlet is available in your environment.
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.

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.




