How it works...

For some of the cmdlets described in this recipe, you can provide a user's e-mail address and credentials to test Exchange connectivity as that user. Alternatively, these cmdlets can use Exchange test accounts to test Exchange connectivity automatically without the need to provide any credentials. Exchange will take care of maintaining these accounts, such as changing their passwords frequently.

In order to use this functionality, you must create one of these test accounts by running the New-TestCasConnectivityUser.ps1 script located at $ExScripts.

Note that this script must be run by an administrator with permissions to create users in the Active Directory.

Using the Test-ServiceHealth cmdlet, you can check whether all the ...

Get Microsoft Exchange Server 2016 PowerShell Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.