Systems Management Question

Custom Inventory Rule using a Windows System Command

02/18/2019 481 views

I am trying to create custom inventory rule using ShellCommandTextReturn running the command Query user.  I cannot get it to run no matter now I try.  What I am trying to accomplish is identify the following:

 Is anyone logged in?

Who is logged in?

Are multiple people logged in?  If so, Who?


0 Comments   [ + ] Show comments


All Answers


can you please show what you are trying?

The best way to run a Windows Command in a CIR is using the cmd interpreter:
(like ShellCommandTextReturn(cmd /c net user) ) so the comman you are trying to run is running in the right environment.
(cmd /c simply does not show the command window)

Answered 02/18/2019 by: Nico_K
Red Belt

  • Thank you, this shows me the local user accounts created on the machine, but not what users are currently logged in.

you need ShellCommandTextReturn(cmd /c Query user)

Answered 02/19/2019 by: SMal.tmcc
Red Belt

  • Exactly! But it doesn't run when machines check in. It runs fine manually from command line.
    • it is a sysnative problem you are running into. query.exe does not exist in the 32bit system directory "syswow64" so the 32 bit kace client cannot find the file to run.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ