To get all mailboxes with IMAP enabled using powershell, use the command below Get-CASMailbox -resultsize unlimited | where {$_.IMAPEnabled} | select Name, SamAccountName
To get all mailboxes with IMAP enabled using powershell, use the command below Get-CASMailbox -resultsize unlimited | where {$_.IMAPEnabled} | select Name, SamAccountName