Accurately Get Mailboxes Hosted on a Specific DAG Server

In a DAG configuration, the -Server option of Get-Mailbox may not return accurate information. You can get accurate information by combining it with Get-MailboxDatabaseCopyStatus.

When you use the -Server option with Get-Mailbox, it returns the mailboxes that match the msExchHomeServerName attribute of the user object. The ServerName in the Get-Mailbox results is also the value of the msExchHomeServerName attribute. However, in a DAG environment, this attribute may not be updated after an event such as a failover.

Read more

A Script to Get Exchange Server Build Numbers

I created a script to get Exchange server build numbers and published it on GitHub. You can access it here. It works by searching a definition file, which I created based on the public information below, for the build number of the specified product version. I’d like to keep updating it whenever a new CU is released.

TITLE: Exchange Server updates: Build numbers and release dates
URL: https://learn.microsoft.com/en-us/exchange/new-features/build-numbers-and-release-dates

Read more

Adding an alias to the output of Get-MailboxStatistics

The Get-MailboxStatistics command lets you retrieve usage information for a mailbox, such as its size, but the output does not include the mailbox alias. The closest thing available is DisplayName. When you export the results to a CSV file, however, it is convenient to also have the alias, since it is a unique value.

Here is one way to handle this. You first store the mailbox information in a variable, and later use the Expression parameter of the Select command to add the alias to the output.

Read more

How EwsAllowList / EwsBlockList behaves

Whether on-premises or online, you can restrict which EWS applications can connect by using the Set-CasMailbox command. EWS access can be controlled in fairly fine detail, letting you register the user agent strings that EWS applications use in an allow list or a block list.

That’s where EwsAllowList / EwsBlockList come in, but they have a somewhat annoying behavior. The strings you register in EwsAllowList / EwsBlockList are not case sensitive. So, for example, if you register “MyApp*“, you can’t also register “MYAPP*“. However, when Exchange actually uses that list to allow or block an EWS application’s connection, the match is case sensitive.

Read more

View all posts