Issue with reports and non en-US locale

I guess many of you have encountered this error trying to open a favorite or scheduled report, this issue is all about localization and it’s here since RTM. The workaround is to set the locale on the machines that are going to run reports to en-US. This can be acceptable in many cases, but not always. A workaround for the workaround is to set the locale to en-US just before launching the console and resetting to the preferred settings after the console has started. This works because the OpsMgr console doesn’t manage locale change events (which it should as any Windows app, but anyway this comes handy in this case).



This has been my workaround for years, until today when I decided to write a quick powershell script to automate the set / run / reset stuff.

Just save the script and create a shortcut the resambles the following (where startom.ps1 is the name you’re supposed to give to the script:

powershell -command "&{".\StartOM.ps1"}


$key = get-item -path ‘hkcu:\Control Panel\International’
$curLocale = $key.GetValue(‘Locale’)
$curLocaleName = $key.GetValue(‘LocaleName’)
$curShortDate = $key.GetValue(‘sShortDate’)

$opsMgrConsole = (get-item -path ‘hklm:\Software\Microsoft\Microsoft Operations Manager\3.0\Setup’).GetValue(‘InstallDirectory’) + "\Microsoft.MOM.UI.Console.exe"

set-itemproperty -path $key.PSPath -name ‘LocaleName’ -value ‘en-US’
set-itemproperty -path $key.PSPath -name ‘Locale’ -value ‘00000409’
set-itemproperty -path $key.PSPath -name ‘sShortDate’ -value ‘M/d/yyyy’

start-process $opsMgrConsole

start-sleep -Seconds 60

set-itemproperty -path $key.PSPath -name ‘LocaleName’ -value $curLocaleName
set-itemproperty -path $key.PSPath -name ‘Locale’ -value $curLocale
set-itemproperty -path $key.PSPath -name ‘sShortDate’ -value $curShortDate

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

  1. Leave a comment

Leave a Reply

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

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

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s

%d bloggers like this: