Here is an interesting PowerShell cmdlet to check that your Exchange services are running.
Topics for Exchange 2010 PowerShell
- Test-SystemHealth Credentials
- Research Parameters for Test-SystemHealth with Get-Command
- More Exchange PowerShell Cmdlets
I cover PowerShell basics elsewhere and I am assuming that you have a working knowledge of the cmdlets and how to research parameters. Incidentally, I use PowerShell 2.0’s graphical ISE, rather than the command line version.
Before you run the Test-SystemHealth command make sure that your logon account has been delegated the Exchange Server Administrator role and is a member of the local Administrators group for the target server.
# Simple PowerShell Example:
Note 1: You can change the credentials with the parameters -AdCredentials or -ExchangeCredentials.
Example Results: ServicesRunning
Mailbox Role e.g. MSExchangeSA
Client Access e.g. MSExchangeADTopology
Just examples, the real results list all the Exchange Services and show which are running and which are not.
Get-Help Test-SystemHealth -full
Note 2: While the -Role parameter says ‘Reserved’, you may like to try these commands depending on your Exchange Server 2010.
-Role ClusterMailbox # (Active Mailbox role)
-Role Gateway # (Edge role)
-Role Bridgehead # (Hub Transport role)
Note 3: Also among the parameters -OutFileLocation and -DomainController are useful.
Note 4: There is a sister command with similar spelling called, Test-ServerHealth.
Note 5: Test-SystemHealth is very like the Exchange Best Practice Analyzer (ExBPAcmd).
Here is a free tool to monitor your Exchange Server. Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.
This is the real deal – there is no catch. SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.
PowerShell Pre-requisites and Checklist
In the case of Windows 7 and later, you don’t need to download any extra files, just: ‘Add Feature’ –> Windows PowerShell. However, for older operating systems, there are different versions of PowerShell for XP, Windows Server 2003 and Vista. For such legacy systems only, you need to download PowerShell from Microsoft’s site.
Once you have installed PowerShell 2.0 or later, I recommend choosing the ISE (Integrated Scripting Engine) version, it will save buying a text editor.
Summary of PowerShell Exchange Test-SystemHealth
Here is an interesting PowerShell cmdlet to check that the required services are actually running on your Exchange 2010 server.
If you like this page then please share it with your friends
See more Microsoft PowerShell tutorials:
Please email me if you have a better script examples. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.