SCOM command line parameters

Agent – (MOMAgent.msi)
msiexec.exe /i \\path\Directory\MOMAgent.msi /qn /l*v \logs\MOMAgent_install.log USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP= MANAGEMENT_SERVER_DNS= ACTIONS_USE_COMPUTER_ACCOUNT=0 ACTIONSUSER= ACTIONSDOMAIN= ACTIONSPASSWORD=

Typical – (MOM.msi)
msiexec.exe /i \\path\Directory\MOM.msi /qn /l*v \logs\MOMTypical_install.log ADDLOCAL=ALL USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP= MANAGEMENT_SERVER_DNS= SQLSVR_INSTANCE= ADMIN_ROLE_GROUP=”DomainName/Account” ACTIONS_USE_COMPUTER_ACCOUNT=0 ACTIONSUSER= ACTIONSDOMAIN= ACTIONSPASSWORD= SDK_USE_COMPUTER_ACCOUNT=0 SDK_ACCOUNT= SDK_DOMAIN= SDK_PASSWORD=

Database –(MOM.msi)
msiexec.exe /i \\path\Directory\MOM.msi /qn /l*v \logs\MOMDB_install.log ADDLOCAL=MOMDB USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP= SQLSVR_INSTANCE= DB_SIZE=500 ADMIN_ROLE_GROUP= DATA_DIR= LOG_DIR=

Server –(MOM.msi)
msiexec.exe /i \\path\Directory\MOM.msi /qn /l*v \logs\MOMServer_install.log ADDLOCAL=MOMServer USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP= MOM_DB_SERVER= ACTIONS_USE_COMPUTER_ACCOUNT=0 ACTIONSUSER= ACTIONSDOMAIN= ACTIONSPASSWORD= SDK_USE_COMPUTER_ACCOUNT=0 SDK_ACCOUNT= SDK_DOMAIN= SDK_PASSWORD=

UI –(MOM.msi)
msiexec.exe /i \\path\Directory\MOM.msi /qn /l*v \logs\MOMUI_install.log ADDLOCAL=MOMUI USE_SETTINGS_FROM_AD=0 MANAGEMENT_GROUP= ROOT_MANAGEMENT_SERVER_DNS=

WebConsole (MOM.msi)
msiexec.exe /i \\path\Directory\MOM.msi /qn /l*v \logs\MOMUI_install.log ADDLOCAL=MOMWebConsole WEB_CONSOLE_AUTH_TYPE=0 ROOT_MANAGEMENT_SERVER_DNS=
( ‘0′ is windows auth and ‘1′ is Forms auth)

Data Warehouse- (Reporting2007.msi)
msiexec.exe /i \\path\Directory\Reporting2007.msi /qn /l*v “D:\LOGS\REPORTING_INSTALL.LOG” ADDLOCAL=”MOMREPORTINGDB” SQLSVR_INSTANCE=”” MOMREPORTINGDBNAME=”SCOMDW” DB_SIZE=”1000″

Reporting Server (Reporting2007.msi)
msiexec.exe /i \\path\Directory\Reporting2007.msi /qn /l*v “D:\LOGS\REPORTING_INSTALL.LOG” ADDLOCAL=”MOMREPORTING” SQLSVR_INSTANCE=”” MOMREPORTINGDBNAME=”SCOMDW” MGSERVER= PREREQ_COMPLETED=”1″ REPORT_SERVER_FULL_HTTP_PATH=”http://%COMPUTERNAME%:80/ReportServer$INSTANCE1″ DATAREADER_USER= DATAREADER_PASSWORD= DATAREADER_DOMAIN= DBWRITEACTIONSUSER= DBWRITEACTIONSPASSWORD= DBWRITEACTIONSDOMAIN=

Gateway Server (MOMGateway.msi)
msiexec /i \\path\Directory\MOMGateway.msi /qn /l*v D:\GATEWAY_SERVER_INSTALL_1.LOG ADDLOCAL=MOMGateway,MOMNonRootServer SECURE_PORT=5723 MANAGEMENT_GROUP=MyConfigGroup MANAGEMENT_SERVER_DNS= IS_ROOT_HEALTH_SERVER=0 ROOT_MANAGEMENT_SERVER_AD= ROOT_MANAGEMENT_SERVER_DNS= ROOT_MANAGEMENT_SERVER_PORT=5723 ACTIONS_USE_COMPUTER_ACCOUNT=0 ACTIONSUSER= ACTIONSDOMAIN= ACTIONSPASSWORD=

Audit Collection Server (AdtSetup.exe)
The cmd line you will use would look like this:\\PATH\Directory\AdtSetup.exe /i /s /p:ACSInstallParameters.xml
You will need to specify ACSInstallParameters.xml while passing the command line you will configure all your setting in the XML file before passing it. The XML file is attached.

For ‘/i’ is for ‘install’, ‘/s’ is for ’silent’, and ‘/p’ is for parameter (file)…

These are the command line parameter to upgrade from OpsMgr 2007 RTM to SP1 RC. Users must upgrade the RMS first which will remotely upgrade the DB. When you upgrade the Reporting Server setup will remotely upgrade the Data Warehouse as well. In order to upgrade the RMS, MS or UI you will need to run step 1 and then step 2 of the command line.

SP1RC Upgrade of RMS, MS and UI: Step 1
msiexec /p MOM2007QFEPreSP1.msp REINSTALLMODE=omus REINSTALL=ALL /qn /l*v D:\logs\QFERollup.log

SP1 RC Upgrade of RMS, MS and UI: Step 2 (DB gets upgraded automatically)
msiexec /p MOM2007SP1.msp SP1UPGRADE=1 REINSTALLMODE=omus REINSTALL=ALL /qn /l*v D:\logs\SP1Update.log

SP1 RC Upgrade of Gateway Server
msiexec /i MOMGateway.msi SP1UPGRADE=1 SET_ACTIONS_ACCOUNT=0 REINSTALLMODE=vomus REINSTALL=ALL /qn /l*v D:\logs\GatewayUpdate.log

SP1 RC Upgrade of Reporting (DW gets upgraded automatically)
msiexec /i Reporting2007.msi SP1UPGRADE=1 SET_ACTIONS_ACCOUNT=0 REINSTALLMODE=vomus REINSTALL=ALL /qn /l*v D:\logs\ReportingUpdate.log

SP1 RC Upgrade of Agent
msiexec /i MOMAgent.msi SP1UPGRADE=1 SET_ACTIONS_ACCOUNT=0 REINSTALLMODE=vomus REINSTALL=ALL /qn /l*v D:\logs\AgentUpdate.log

SP1 RC Upgrade of Audit Collection
msiexec /i AdtServer.msi ADDLOCAL=ALL REINSTALLMODE=vamus REINSTALL=ALL /qn /l*v D:\logs\ACSUpdate.log


MOM2005 Notification Command parameterlista

Har letat en bra stund efter alla parametrar för att skicka ut larm via “Notification Command” i MOM2005.

Hittade efter lite om och men en lista. Bra-att-veta, kör man managed code så finns det en bugg och då behöver man köra med det numeriska värdet istället.

Event parameters
Event Number = 01
Full Event Number = 02
Event Type = 03
Message Dll = 04
Source Name = 05
Provider Name = 06
Provider Type = 30
Description (Message) = 07
Message Dll File Version = 08
Logging Computer = 09
Category = 10
Event Time = 11
Source Computer = 12
User Name = 13
User Domain Name = 26
Logging Domain = 14
Source Domain = 15
Repeat Count = 17
First Time = 18
Last Time = 19
Start Time = 20

Alert parameters
Source (Culprit) = 50
Name = 62
Description = 63
Owner = 51
Severity = 52
ResolutionState = 53
AlertTime = 54
Computer = 55
Domain = 56
Alert Rule Group ID = 64
Custom Field1 = 57
Custom Field2 = 58
Custom Field3 = 59
Custom Field4 = 60
Custom Field5 = 61

Performance parameters
Object = 21
Counter = 22
Instance = 23
Time = 24
Value = 25

Varför letade jag då? Jo jag håller på att hacka lite på mitt EasyCall-script…


Tidsstämpling i loggar

Okej… att använda “date /T” och “time /T” i ett cmd-script för att få lite tidstämplar är inte snyggt men det fungerar..

Råkade surfa förbi ett lite snyggare sätt att göra det…

for /f "tokens=*" %i in (‘date /t’) do @for /f "tokens=*" %j in (‘time /t’) do @echo %i%j "Mitt fina loggentry"
 

Som jag skrev tidigare… for-kommandot kan göra en hel del roliga saker.

Lite mer info på Sapien techs blog


Göra saker med massor av kataloger

Om man har en katalog inehållande ett gäng filer eller kataloger har man ibland behov av att förändra dessa.
Med hjälp av ett mycket litet cmd-script kan man ganska enkelt göra det.

Kommandot FOR kan göra massor av roliga saker…

Kopiera texten nedan, spara ner det i en lämplig CMD-fil. Scriptet kallar på det_andra_scriptet.cmd med första parametern satt till biblioteksnamnet.

FOR /F %%i IN (dir X:\PATH\*. /b’) do call det_andra_scriptet.cmd %%i
 

Så i det andra scriptet kan man exempelvis göra:

MD %1\NyKatalog
 

Eller vad man nu känner för.

Tips: Smidigt att schemalägga ett script som sätter fixar upp rättigheter, städar upp “skit” i användares hemmakataloger.