Clarity Client Automation

Expand all | Collapse all

OSIM OS Installation Parameters by group

Jump to Best Answer
  • 1.  OSIM OS Installation Parameters by group

    Posted 08-31-2017 03:18 AM

    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).



  • 2.  Re: OSIM OS Installation Parameters by group
    Best Answer

    Posted 08-31-2017 10:31 AM

    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

     

    Then run:

     

                    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

    CA Technologies

    Principal Services Consultant

    Stephen.McCormick@ca.com

    <mailto:Stephen.McCormick@ca.com>



  • 3.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 04:19 AM

    Hi Steve,


    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\""

     

    Rgds.

    Sergio



  • 4.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 06:45 AM
      |   view attached

    Hi Sergio,

     

    https://docops.ca.com/ca-client-automation/14-0/en/reference/cli-command-reference/cadsmcmd-command-line-interface/cadsmcmd-commands/targetcomputer-target-computer-commands/targetcomputer-commands-related-to-os-installation-management-osim#TargetComputerCommandsRelatedtoOSInstallationManagement(OSIM)-modfiyInstallParameter--ModifyInstallParametersofOSInstallationOrders

     

    paramValue

    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\"”

     

     

     

     

    Rgds,

    Steve.



  • 5.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 06:55 AM

    Hi Steve,

     

    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.

     

    Rgds.



  • 6.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 07:08 AM

    Then that sounds like a bug.

     

    But I will give it a try myself.



  • 7.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 07:28 AM

    Hi Sergio,

     

    In the batch use “””:

     

    targetcomputer action=ModifyInstallParameter name=ITCM01Sp-W10Se paramName=TimeZone paramValue="""Romance Standard Time"""

     

    Rgds,

    Steve.



  • 8.  Re: OSIM OS Installation Parameters by group

    Posted 02-13-2018 09:53 AM

    Thanks Steve. It works as expected.