Is there a powershell script that exports OWA enabled mailboxes to CSV?

Cameron Adams 20 Reputation points
2023-03-08T14:22:37.82+00:00

When we onboard employees, all mailbox features are turned off by default via a short PS cmdlet. We discovered that there are some users where OWA (that should be disabled) is available and it should not be. I would like to compile a report of how many mailboxes that have OWA enabled, arranged in a table and exported as a CSV. Is this possible? If so, how can it be done?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,206 questions
Outlook | Windows | Classic Outlook for Windows | For business
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Faery Fu-MSFT 19,756 Reputation points Moderator
    2023-03-09T02:11:18.5566667+00:00

    Hi @Cameron Adams ,

    Get-CASMailbox -ResultSize unlimited | where {$_.OWAEnabled -eq "$true"} | Get-MailboxStatistics | Select DisplayName, TotalItemSize | Export-CSV C:\Size.csv
    

    the command is to get all the users who are OWA enabled only and get their mailbox size.

    2


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Rich Matheisen 47,906 Reputation points
    2023-03-08T16:20:53.5566667+00:00

    Use the Get-CASMailbox to get the details about the protocols the mailbox is allowed to use.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.