다음을 통해 공유


Exchange 2010: Failed to execute Troubleshoot-DatabaseSpace.ps1 Error formatting a string

We will get a SCOM alert for Exchange 2010 Management Pack unable to run the Troubleshootdatabase.ps1 after we install Windows Management Framework 3.0 or higher versions on the Exchange servers.

What is this TroubleshootDatabase.ps1 ?

The Troubleshoot-Database.ps1 is located by default at C:\Program Files\Microsoft\Exchange Server\V14\Scripts.

https://exchangequery.files.wordpress.com/2015/03/td1.jpg
This script is triggered from the SCOM Management Pack to the SCOM agent on the Exchange server every 15 minutes to detect and correct any excess log growth or Exchange database log growth.

What is the impact if SCOM MP is unable to trigger this script every 15 minutes?
The Exchange log file growth and database growth becomes unmonitored for people who have SCOM monitoring system for Exchange daily monitoring due to which it can cause the database downtime.

What is the root cause if we find this issue in our environment?

It happens when you have Windows Management Framework 3.0 (Powershell 3.0) installed on the mailbox server recently and thus you're running Powershell v3.0. You might be upgrading this for any recent backup software upgrade for the mailbox servers. There is few backup software for which the recent upgrade requires WMF 3.0. Hence you will never be able to identify why SCOM stopped monitoring your databases and log files.

How do you find this?

When you open Exchange Management shell it will run PowerShell v2.0 and the command will execute just fine. If you just click on the PowerShell button next to the start menu and add PS snap-ins for Exchange 2010 it will run PS v3.0 and the command will fail to execute. You can verify the version of PowerShell by calling $Host.Version in your PS/EMS window. The reason for this is that whenever the script is run by SCOM it will call PowerShell from the "NT AUTHORITY\SYSTEM" context which will run the latest version of PowerShell available while Exchange Management Shell is always calling version 2.0.

By default, this script **(Troubleshoot-DatabaseSpace.ps1) **is triggered to run by the Exchange 2010 Monitoring Management Pack.

Exchange 2010 Management Pack versions 14.03.0038.004 and earlier required only PowerShell 2.0 to be installed on the Exchange server for it to work. When PowerShell 3.0 or higher is installed on Exchange 2010 servers that were working with only PowerShell 2.0 installed, Exchange Management Pack on the SCOM stops monitoring the Exchange databases.

If you log into the SCOM server and check the Exchange Management Pack for SCOM it should be lesser than version **14.03.0038.004 **and earlier as shown below.

In order to check:

Log into the SCOM server - Open operations manager console - Click on Administration - Select Management Packs 

On the right, check the version of the Management Pack installed for Exchange server and it should be lesser than 14.03.0038.004

https://exchangequery.files.wordpress.com/2015/03/ssa.png

Solution:

We need to upgrade our Management Pack for Exchange to the latest version to start monitoring our databases by SCOM. Version 14.3.210.2 of the Exchange 2010 Management Pack released last December helps when PS 3.0 and PS 2.0 are installed together on the same server. There is no need to uninstall PS 3.0 where the monitoring fails.

SCOM Management Pack 14.3.210.2 can be downloaded from this location: http://www.microsoft.com/en-za/download/details.aspx?id=692

The new MSI (Exchange2010PowershellFix.MSI) script that has been included in this release enables Exchange 2010 MP to work on servers that have PowerShell 2.0 installed side by side with PowerShell 3.0+. This new MSI should be used only if the existing Exchange 2010 MP isn’t able to monitor the Exchange 2010 servers that has PowerShell 2.0 and PowerShell 3.0+ installed side by side. This will NOT work if the server has only PowerShell 3.0 or higher installed.

In-order to upgrade to the latest version of the SCOM login to the SCOM server.

Open operations manager console - click on Management Pack - select import management packs and import the latest downloaded Exchange 2010 Management Pack 14.3.210.2 which will solve this problem.

https://exchangequery.files.wordpress.com/2015/03/captures.jpg

 Hope this helps.