Is it possible to set OSIM OS Installation Parameters by group?
I would like to change some parameters (language, timezone) based on location (defined by group membership).
I don’t think it is possible to set parameters by group membership directly but it could be scripted by extracting the group membership using:
cadsmcmd compgroup action=listmem name=groupname
Then for each computer returned by that command, run:
cadsmcmd targetComputer action=ModifyInstallParameter name=computer_name paramName=parameter_name paramValue=parameter_value
Or, for (MUCH) better performance, for each computer, write the following line to a file:
targetComputer action=ModifyInstallParameter name=computer_name paramName=parameter_name paramValue=parameter_value
cadsmcmd batch filename
If you only need to do this once, or infrequently, you don’t need to write a script. Just take the output from the first command and massage the data in the output into the targetcomputer commands then run the batch.
Steve McCormick, ITIL
Principal Services Consultant
I'm trying to use the proposed solution, using a batch file of cadsmcmd commands, but we are finding troubles populating the TimeZone parameter.
If we use the following line:
targetcomputer action=ModifyInstallParameter name=AGENT_NAME paramName=TimeZone "paramValue=Romance Standard Time"
cadsmcmd in batch mode processes it as correct, but TimeZone is populated as "Romance" not as "Romance Standard Time". When OSIM deployment is made, the parameters isn't read correctly and deployment fails.
Any tip on how to pass the TimeZone parameter in batch mode?
By the way, escaping quotes with a backslash, doesn't work either (it works for command line execution, but not for batch mode):
targetcomputer action=ModifyInstallParameter name=AGENT_NAME paramName=TimeZone paramValue="\"Romance Standard Time\""
Specifies the new value of the parameter.
If the parameter is a map list or extended map list, use the format ""
The key and the comment are separated by a blank, and the comment is optional.
If the key contains blanks, enclose it in quotes.
Example: For an XP OS image change the setting of the "TimeZone" parameter to 095 or "095 Central Europe"
For a Vista image change the setting of the "TimeZone" parameter to "\"W. Europe Standard Time\"" or "\"W. Europe Standard Time\" UK time".
As the Time Zone filed is a MapList field you would enter:
Targetcomputer action=ModifyInstallParameter name=AGENT_NAME paramName=TimeZone paramValue=”\”Romance Standard Time\"”
The problem is that it doesn't work in batch mode. If you create a batch file with that command and execute it with "cadsmcmd batch batchfile.txt", it doesn't populate the parameter correctly.
Then that sounds like a bug.
But I will give it a try myself.
In the batch use “””:
targetcomputer action=ModifyInstallParameter name=ITCM01Sp-W10Se paramName=TimeZone paramValue="""Romance Standard Time"""
Thanks Steve. It works as expected.