Get-EXOMailbox filter not working

ComputerHabit 826 Reputation points
2024-05-20T19:05:32.56+00:00

Filters are wearing me out.

This works:

Get-EXOMailbox -PropertySets Archive -Filter "ArchiveStatus -eq 'Active'"

This fails:

Get-EXOMailbox -PropertySets Archive -Filter "AutoExpandingArchiveEnabled -eq 'True'"

WHY?

Microsoft Exchange Online
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,322 questions
{count} votes

Accepted answer
  1. Bruce Jing-MSFT 1,920 Reputation points Microsoft Vendor
    2024-05-21T06:56:30.7033333+00:00

    Hi,@ComputerHabit

    Thanks for posting your question in the Microsoft Q&A forum. 

    Based on your description,I know that you get error when run Get-EXOMailbox -PropertySets Archive -Filter "AutoExpandingArchiveEnabled -eq 'True'".

    I also ran the cmdlet you provided and had the same error. The error message shows that the attribute AutoExpandingArchiveEnabled is not supported when trying to use the $filter parameter.

    User's image

    I checked Microsoft's official document and found that there is no AutoExpandingArchive attribute in the Filter parameters, so it's expected behavior to get this error.

    User's image

    You can refer to this URL for details:  Filterable properties for the Filter parameter | Microsoft Learn

    If you want to get the mailboxes with AutoExpandingArchive enabled, you can run Get-Mailbox -ResultSize Unlimited | Where-Object {$_.AutoExpandingArchiveEnabled -eq $True} | Select-Object DisplayName,AutoExpandingArchiveEnabled

    Since I don't have AutoExpandingArchive turned on for my mailbox, I changed True to False for testing.

    User's image

    If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful