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?

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,287 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
2,905 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,868 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,161 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,025 questions
0 comments No comments
{count} votes

Accepted answer
  1. Faery Fu-MSFT 16,411 Reputation points Microsoft Vendor
    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 44,621 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