Master PowerShell: Get-Mailbox Filterable Properties
In the realm of Exchange Online and on-premises Exchange, mailbox properties can be filtered to create targeted mailbox policies, search criteria, or to manage mailboxes efficiently. These filterable properties are key to handling mailboxes en masse, saving time and effort. Let's delve into these properties and their applications.
Exchange mailboxes are replete with numerous properties, but not all are filterable. This article focuses on the most commonly used filterable mailbox properties, grouping them under two main topics: basic and advanced properties.
Basic Filterable Mailbox Properties
Starting with the basics, these properties form the bedrock of mailbox filtering operations.
Exchange Server and Exchange Online provide a broad range of basic filterable mailbox properties. These include name (First Name, Last Name, Display Name), email addresses (Primary SMTP, Other SMTP, etc.), and general mailbox state properties like IsMailboxEnabled, HasExchangeWebClient, and RecipientType.
Name and SMTP Addresses
The name and SMTP addresses properties are self-explanatory and essential for targeting mailboxes. For instance, creating a mailbox policy for all employees ending with the domain "@example.com".
However, consider using the DistinguishedName property to create a list of recipients that match a specific organizational structure. This property includes the full Active Directory path.
Mailbox State Properties
Mailbox state properties provide insight into the current state of the mailbox. For example, IsMailboxEnabled helps distinguish between enabled and disabled mailboxes. This is useful when performing mass enable/disable operations.
Similarly, HasExchangeWebClient indicates whether the mailbox has an Exchange Web Client (Outlook on the web). This is handy when creating policies or rules that depend on web access, such as applying retention policies.
Advanced Filterable Mailbox Properties
Delving deeper, advanced properties offer more complex filtering options.
Advanced filterable properties include custom attributes (e.g., ExtensionAttribute1, ExtensionAttribute15), department, company, and organizational unit (OU). Additionally, mailbox quotas, item counts, and last logon time can also be filtered.
Custom Attributes
Custom attributes in Exchange offer extensive filtering possibilities. These attributes are defined by administrators and can store anything from employee ID numbers to job titles.
For instance, filter by ExtensionAttribute15 to target all employees who have 'IT' in their job title, identified with the custom attribute.
Quotas and Item Counts
Filterable by size (TotalMailboxSize, TotalItemsInMailbox, and others) or count (TotalItems), these properties help manage storage consumption efficiently. For example, reset mailbox quotas for all mailboxes with high total message counts.
LastLogonTime provides another level of filtering, allowing administrators to focus on inactive or recently active mailboxes.
Understanding and leveraging these filterable properties can greatly enhance your mailbox management workflow, streamlining tasks and improving overall Exchange environment governance. As a final thought, staying updated with Exchange's evolving features ensures you get the most out of these powerful filterable properties.