{"id":128,"date":"2016-12-11T21:10:50","date_gmt":"2016-12-11T19:10:50","guid":{"rendered":"http:\/\/itsimple.info\/?p=128"},"modified":"2016-12-11T21:10:50","modified_gmt":"2016-12-11T19:10:50","slug":"how-to-get-exchange-health-status","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=128","title":{"rendered":"How to Get exchange health status"},"content":{"rendered":"<p>To get exchange health status first open exchange Powershell , run the command :<\/p>\n<p>Get-MailboxDatabaseCopyStatus * | sort name | Select name,status,contentindexstate<\/p>\n<p>\u00a0<\/p>\n<p>If all the databases are mounted and the index state is healthy you are in a good state. To fix the index if not healthy :<\/p>\n<p>Stop-Service MSExchangeFastSearch<br \/>\nStop-Service HostControllerService<br \/>\n#get the path to the index file folder:<br \/>\nGet-MailboxDatabase glilyamDBNew | select EdbFilePath<br \/>\n#Delete the folder GuiD, The folder it self, Restarting the services will re-creat it<\/p>\n<p>Start-Service MSExchangeFastSearch<br \/>\nStart-Service HostControllerService<\/p>\n<p>Test-ExchangeServerHealth.ps1 script will Perform a series of health checks on the specified Exchange servers<br \/>\nand outputs the results to screen, and optionally to log file, HTML report, and HTML email.<\/p>\n<p>Test-ExchangeServerHealth.ps1 download:\u00a0 <a href=\"https:\/\/gallery.technet.microsoft.com\/scriptcenter\/Generate-Health-Report-for-19f5fe5f\/file\/133621\/6\/Test-ExchangeServerHealth.ps1\">https:\/\/gallery.technet.microsoft.com\/scriptcenter\/Generate-Health-Report-for-19f5fe5f\/file\/133621\/6\/Test-ExchangeServerHealth.ps1<\/a><\/p>\n<p>MOre information about implementation :\u00a0 <a href=\"https:\/\/github.com\/cunninghamp\/Test-ExchangeServerHealth.ps1\">https:\/\/github.com\/cunninghamp\/Test-ExchangeServerHealth.ps1<\/a><\/p>\n<p>\u00a0<\/p>\n<p>Examples:<\/p>\n<pre>.\\Test-ExchangeServerHealth.ps1\r\n<\/pre>\n<p>Checks all servers in the organization and outputs the results to the shell window.<\/p>\n<pre>.\\Test-ExchangeServerHealth.ps1 -Server Your_Server_Name\r\n<\/pre>\n<p>Checks the server and outputs the results to the shell window.<\/p>\n<pre>.\\Test-ExchangeServerHealth.ps1 -ReportMode -SendEmail\r\n<\/pre>\n<p>Checks all servers in the organization, outputs the results to the shell window, a HTML report, and emails the HTML report to the address configured in the script.<\/p>\n<p>If you use the report mode you\u2019ll get a HTML file containing the health check results, and\/or an email to your designated address if you also use the send email option.<\/p>\n<p>For the email functionality to work please update these variables in the script to suit your environment.<\/p>\n<pre class=\"plain\">#...................................\r\n# Modify these Email Settings\r\n#...................................\r\n\r\n$smtpsettings = @{\r\n\tTo =  \"administrator@exchangeserverpro.net\"\r\n\tFrom = \"exchangeserver@exchangeserverpro.net\"\r\n\tSubject = \"Exchange Server Health Report - $now\"\r\n\tSmtpServer = \"smtp.exchangeserverpro.net\"\r\n\t}<\/pre>\n<div class=\"content-box-blue\">A lot of people ask how to add multiple recipients to the SMTP settings. My advice is to use a distribution group, so that any time you need to modify the list of recipients you can simply change the distribution group membership instead of needing to modify the script code.<\/div>\n<p>When running the script on non-English servers you can modify the following variables in the script to match your language so that the script does not give errors or incorrect results.<\/p>\n<pre class=\"plain\">#...................................\r\n# Modify these language \r\n# localization strings.\r\n#...................................\r\n\r\n# The server roles must match the role names you see when you run Test-ServiceHealth.\r\n$casrole = \"Client Access Server Role\"\r\n$htrole = \"Hub Transport Server Role\"\r\n$mbrole = \"Mailbox Server Role\"\r\n$umrole = \"Unified Messaging Server Role\"\r\n\r\n# This should match the word for \"Success\", or the result of a successful Test-MAPIConnectivity test\r\n$success = \"Success\"\r\n<\/pre>\n<p>For example, a German system would use the following values:<\/p>\n<pre class=\"plain\"># The server roles must match the role names you see when you run Test-ServiceHealth.\r\n$casrole = \"Clientzugriffs-Serverrolle\"\r\n$htrole = \"Hub-Transport-Serverrolle\"\r\n$mbrole = \"Postfachserverrolle\"\r\n$umrole = \"Unified Messaging-Serverrolle\"\r\n\r\n# This should match the word for \"Success\", or the result of a successful Test-MAPIConnectivity test\r\n$success = \"Erfolgreich\"\r\n<\/pre>\n<p>Use the <strong>ignorelist.txt<\/strong> file to specify the names of any servers, DAGs, or databases that you want to ignore for the tests.<\/p>\n<p>My scheduled task settings for this script are:<\/p>\n<ul>\n<li>Run whether user is logged on or not<\/li>\n<li>Run with highest privileges<\/li>\n<li>Action: Start a program\n<ul>\n<li>Program: powershell.exe<\/li>\n<li>Arguments:\u00a0-command \u201cC:\\Scripts\\ExchangeServerHealth\\Test-ExchangeServerHealth.ps1 -Log -SendEmail\u201d<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To get exchange health status first open exchange Powershell , run the command : Get-MailboxDatabaseCopyStatus * | sort name | Select name,status,contentindexstate \u00a0 If all the databases are mounted and the index state is healthy you are in a good state. To fix the index if not healthy : Stop-Service MSExchangeFastSearch Stop-Service HostControllerService #get the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-microsoft-exchange-2010"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=128"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}