Test-ExchangeServerHealth.ps1 v1.2 Released

I have just uploaded version 1.2 of the Test-ExchangeServerHealth.ps1 script.

This version includes a number of important bug fixes, as well as adding the DAG health check (from Get-DAGHealth.ps1).

You can download the new version here.

Please continue to report bugs and make feature requests in the comments on that post.

Comments

  1. Luca says

    Thanks Paul!!
    the script is really useful and saves me a lot of time during daily activity.
    Really a great job!!

  2. Marc says

    I am getting really frustrated the script via Task Scheduler.

    Environment:
    Windows 2008 R2
    Exchange 2010

    Problem >>
    I have two environments:
    Lab Environment: It works via Task Scheduler and when I run manually.
    Production Environment: Only if I run the scripts manually. Not via Task Scheduler.

    The user I am using on my production environment is a member of Domain Admins + Organization Management.
    If I log in the production environment I can run my scripts manually successfully.

    How my Task is configured:
    Run whether user is logged or not – checked
    Run with high privileges – checked

    Program/script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Argument: -Version 2.0 -NonInteractive -WindowsStyle Hidden -executionpolicy unrestricted -command “. ‘c:\Program Files\Microsoft\Exchange Server\v14\bin\RemoteExchange.ps1′; Connect-ExchangeServer -auto; c:\scripts\Test-ExchangeServerHealth.ps1 -Log -SendEmail”

    No matter what I do, the task seems to complete(according the history of the task – no erros whatsoever) but it does not send the report.

    Initially I thought was my SMTP server, but if I run the script manually works….like:
    .\Test-ExchangeServerHealth.ps1 -Log -SendEmail”

    I already ran:
    Set-ExecutionPolicy Unrestricted
    Set-ExecutionPolicy RemoteSigned
    No difference!

    If I run manually it works. The same happens with another script (Get-ExchangeEnvironmentReport). If I run manually it works. If I try to run via Task Scheduler, nothing happens.
    I reckon it is a permission issue. But to be honest I am running out of ideas.

    Any ideas?
    Please help ;-(

    • says

      My task scheduler argument is just:

      -command “C:\Scripts\ExchangeServerHealth\Test-ExchangeServerHealth.ps1 -Log -SendEmail”

      You don’t need to call remoteexchange.ps1 and connect-exchangeserver. The script handles that for you.

      Other than that, when in doubt just open a cmd.exe and paste in the full one-liner command you’re trying to run via Task Scheduler (eg powershell.exe -command “blah”) and see if that gives you any more clues.

      • Marc says

        Thanks Paul
        I managed to have it working using the following argument:

        -command “. ‘C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1′; Connect-ExchangeServer -auto; c:\Scripts\Test-ExchangeServerHealth.ps1 -Log -SendEmail”

        I will leave like this now. :-)

  3. Phil Ready says

    Hi Paul
    Great script!
    I have been using with Exchange 2010. Do you have a updated version for Exchange 2013?

      • v-9basa says

        Hi Paul,

        Is there a script which will give us exchange resources report like disk size, quota usage per mailbox in percentage, transport data drive size, white space, no. of users per databse and these mailboxes who haven’t logged since 30 days or more, disabled mailboxes, most active mailboxes, and those mailboxes who are near to warning quota, and any other important exchange resources you can think of..thanks. I am using your scripts gat-daghealth and get-mailboxstatistcs scripts..thanks a lot for those scripts…..any inputs for my request

Leave a Reply

Your email address will not be published. Required fields are marked *