Thursday, 06 March 2014 20:22

Designing and executing Orchestrator Runbooks with unique location settings

Rate this item
(0 votes)

Erstellt am Donnerstag, 06. März 2014 Geschrieben von Stefan Horz

Some of you are already aware of the problem:
If you design a Runbook with a Runbook Designer installed with a different Home location set in Control Panel Region on your Windows than it be executed or transported some Integration Packs do not work correctly.

For example: The classes and fields from the Integration Pack of System Center Service Manager (IP for SCSM) are shown in your local language.

SCSM Settings in German

Home Location

If you execute or open the Activity in another location you may get an error like: "Cannot find ManagementPackEnumeration [In Progress]".

If you don’t want to change the location permanently you can use a Powershell-Script to start Orchestrator Designer and before change the location temporarily.

Start Orchestrator Runbopk Designer

SCSM Settings in English

Here is the script:


#----------------------------------
# SCO CONSOLE IN ENGLISCH STARTEN
#----------------------------------
$key = get-item -path 'HKCU:\Control Panel\International'
$curLocale = $key.GetValue('Locale')
$curLocaleName = $key.GetValue('LocaleName')
$curShortDate = $key.GetValue('sShortDate')
$key2 = get-item -path 'HKCU:\Control Panel\Desktop'

# Falls die Konsolen Sprache auch Englisch sein soll dann das Kommentarzeichen aus der nächsten Zeile entfernen
$curLanguage = $key2.GetValue('PreferredUILanguages')

$RunbookDesigner = "C:\Program Files (x86)\Microsoft System Center 2012 R2\Orchestrator\Runbook Designer\RunbookDesigner.exe"

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

# Falls die Konsolen Sprache auch Englisch sein soll dann das Kommentarzeichen aus der nächsten Zeile entfernen
set-itemproperty -path $key2.PSPath -name 'PreferredUILanguages' -value 'en-US'

start-process $RunbookDesigner
# $arguments

start-sleep -seconds 120

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

# Falls die Konsolen Sprache auch Englisch sein soll dann das Kommentarzeichen aus der nächsten Zeile entfernen
set-itemproperty -path $key2.PSPath -name 'PreferredUILanguages' -value $curLanguage

#------------
# SCRIPT ENDE
#------------

Read more

Leave a comment