CA Client Automation

  • 1.  How can I use cadsmcmd for certain queries

    Posted Sep 07, 2018 10:57 AM

    Hello,

    1)

    I would like to automize something by using the tool cadsmcmd (or any other available tool). As it has a batch mode it should be able to automize what I want to accomplish.
    Computer groups structure our environment. Under "Computers and Users" on our Domain Managers we have Groups like
    _Dep1
    _Dep2
    , etc.

    Within _Dep1 there are folders like
         _Dep1_AllClients
         _Dep1_Clients_Manual
    , etc.

    On one domain manager I want to either run through all machines under "All Computers" or preferrably through a group like _Dep1_Clients_Manual. I would like to extract from the computers in the chosen group the IP address, the mac address and the name; this data I want to collect into a comma-separated file in order to add the machines to certain groups later.

     

    2)

    Then I need another query in our new environment (14.2). I would like to check every computer or also computers within a certain computer group and find out whether they have a certain software package installed. Let's assume there is a software package named 993_myPackage.

    So I would like to find out which computers have this package installed (or on which it can be found, which means it is installed but not yet available on the new server). Those that have it installed I would like to add to a certain static group, lets say 993_Dep1_PostInstall.

    How could I accomplish that with the cadsmcmd tool? I did already use it to create new computers by using its batch mode. So the above should be possible.

    Would somebody know or would somebody have some ideas?

    Where is a manual for the cadsmcmd tool in 14.02 and 12.9? Preferrably with some examples.

     

    Thank you.

     

    Andreas



  • 2.  Re: How can I use cadsmcmd for certain queries

    Broadcom Employee
    Posted Sep 07, 2018 11:43 AM

    Why not build the query in the gui then use that to create a report and export the report in csv format.  You can use the command line to create groups add members to groups but not to get inventory.  If you truly do need to create the queries you could do it with web services but by the time you figure out the syntax for the items to capture you would need to do it in the gui first then create the appropriate web service calls.

     

    Richard Lechner

    Principal Engineering Services Architect

     

    CA Technologies

    Mobile: +1 703 655 7161 | Richard.Lechner@ca.com

     

    <mailto:Richard.Lechner@ca.com>[CA]<http://www.ca.com/us/default.aspx>[Twitter]<http://twitter.com/CAInc>[Slideshare]<http://www.slideshare.net/cainc>[Facebook]<https://www.facebook.com/CATechnologies>[YouTube]<http://www.youtube.com/user/catechnologies>[LinkedIn]<http://www.linkedin.com/company/1372?goback=.cps_1244823420724_1>[Google]<https://plus.google.com/CATechnologies>[Google+]<http://www.ca.com/us/rss.aspx?intcmp=footernav>



  • 3.  Re: How can I use cadsmcmd for certain queries
    Best Answer

    Posted Sep 07, 2018 01:32 PM

    CADSMCMD can do a lot of things. I use it for a lot of batch and scripted

    functions. It has some limitations though. As Rich mentioned it can't get

    inventory, but it CAN get the IP Address and MAC address along with some

    other info, using 'TargetComputer ShowAttr'. It also cannot create or read

    queries. Basically the program was created for Software Delivery and has

    not been completely updated to support Asset Management or Remote Control

    functions. You can therefore get installed SD packages using

    'TargetComputer ListInst', but you can't get software inventory.

     

    The full syntax of the CADSMCMD commands is in docops at

    https://docops.ca.com/ca-client-automation/14-0/en/reference/cli-command-reference,

    or for 12.9 there is a PDF 'ITCM_CLI_Ref_ENU' on the installation media.

     

    What you are looking to be able to do should be possible using CADSMCMD. I

    know you used the word 'query' but I'm assuming you were not referring to

    an ITCM query but rather using the cadsmcmd tool to query the system. You

    can 'query' the members of a group, get the list of computers then (in

    batch mode) query the installed packages for each of them using

    'targetcomputer listinst' then for each computer with the package you can

    add them to the target group using the compgroup commands.

     

    Steve McCormick

    smccormick@aspiretp.com

     

     

     

    On Fri, Sep 7, 2018 at 9:57 AM AndreasMeyer <