Wednesday, March 30, 2011

Bug in scripting in SCOM

In the DOS there is one unpleasant bug that manifests itself in SCOM. If one of the parameters contains quote, then quote will be lost in the end. What then shall we do?

We can use Enviroment Variables for transfer theese parameters.
Btgore transfer set variable in command line
SET param1=His name is "Bond"

In script read this parameter from enviroment vaiable

Set objShell = WScript.CreateObject("WScript.Shell")
Set oEnvVars = objShell.Environment("Process")
Wscript.Echo oEnvVars("param1")

That all.

No comments:

Post a Comment