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 on the C:\Program Files\Microsoft\Exchange Server\V14\Scripts.

TD1
This script is triggered  from the SCOM Management Pack to the SCOM agent on the exchange servers  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 down time.

 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 are 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 PS v2.0 and the command will execute just fine, but if you just click on the Powershell button next to start menu and add PSsnapins for Exchange 2010 it will run PS v3.0 and the command will fail to execute. You can verify the version of Powershell run by calling $Host.Version in your PS/EMS window. The reason for this is, that whenever the script is ran by SCOM it will call PS from “NT AUTHORITY\SYSTEM” context which will run the latest version of PS 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 login to 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.

Inorder to check

Login to the SCOM server – Open operations manager console – Click on Administration and – select management packs

Over the right check the version of the management pack installed for exchange server and it should be lesser than 14.03.0038.004

SSA

 

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 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.

Captures

Hope this helps.

Thanks 

Sathish Veerapandian

MVP – Exchange Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: