Clarity Client Automation

Expand all | Collapse all

What are the limits of filter when using cadsmcmd targetcomputer?

  • 1.  What are the limits of filter when using cadsmcmd targetcomputer?

    Posted 05-17-2019 06:03 AM

    Hello,

     

    I'm trying to filter a list of computers based on a selection of scalability servers and OS information

    I tried the following:

    (Staging-Server-Name and Betriebssystemtyp are the German attributes)

    cadsmcmd targetcomputer action=list DisHwOnly filter="(Staging-Server-Name=host1 || Staging-Server-Name=host2 || Staging-ServerName=host3) && (Betriebssystemtyp=WIN_7_X64 || Betriebssystemtyp=WIN_7_INTEL))"

     

    But so far I only got it to work with a maximum of 2 checks combined:

    cadsmcmd targetcomputer action=list DisHwOnly filter="(Staging-Server-Name=host1 || Staging-Server-Name=host2) && Betriebssystemtyp=WIN_7_X64)"

     

    If I try any more it either complains, that there's an unexpected logical operator or the filter string is too long...

     

    Is there something I'm doing wrong or a different approach here? The query needs to be dynamic, because I create it during a script run and might contain more or fewer server names / OSs.

     

    I'd appreciate any pointers that could help.

     

    Regards,

     

    Marco Lorenz



  • 2.  Re: What are the limits of filter when using cadsmcmd targetcomputer?

     
    Posted 05-17-2019 06:52 AM

    i will do some testing but there is a 256 character limit on the command line I believe.



  • 3.  Re: What are the limits of filter when using cadsmcmd targetcomputer?

    Posted 05-22-2019 09:15 AM

    Would that maybe work through the batch interface as a way to circumvent the limitations?

     

    Or is a different API available? (I tried to access the Pipeline Mode years ago, but couldn't convince it to work through PowerShell :-))