In this article there is once again a small script that can display the status of important Exchange parameters. The script clearly shows the status of the databases, queues, services and storage space. So you can get a first quick overview of the Exchange status in case of problems. The script can be downloaded from GitHub:
I run the script directly when starting the Exchange Shell, so the start of the shell takes a little longer, but I have a direct overview of the most important parameters. This is what the start of the Exchange Shell looks like on my test Exchange Server:
For example, if one of the Exchange services is not running, I get the status displayed directly when I start the Exchange Server Management Shell:
To run the script directly when starting the Management Shell, you only need to adjust the shortcut in the Start menu. To do this, the location of the shortcut must be opened from the Start menu:
The target of the link can now be edited:
In the default setting, the target of the link looks something like this:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'D:\Exchange Server\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto -ClientApplication:ManagementShell"
At the end you can now simply append the script that is to be executed when the shell is started:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'D:\Exchange Server\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto -ClientApplication:ManagementShell; . 'C:\Install\Get-ExchangeStatus.ps1'"
When adding the status scripts, the syntax must be observed: Semicolon, followed by a period and the path in apostrophe. Of course, the script can also be executed manually. The following command can be used for this:
.\Get-ExchangeStatus.ps1
You are welcome to send me your suggestions as to which data you would like to see at first glance, as the script can be extended as required. You can also contribute directly on GitHub.