locked
Does "active" for sc query state= really work? RRS feed

  • Question

  • Hi,

    The docs say sc tool for service management should accept query command state= with parameter active

      sc query state= active

    but it doesn't work in Windows 7, Windows 10. "Inactive", "all" both  work.

    Is this a bug?

    Thanks,

    Max
    Friday, August 31, 2018 8:59 AM

Answers

  • It appears that the "state" parameter can only be "inactive" or "all". The default, when "state" is not specified, is active (running).

    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    • Marked as answer by maxerist Friday, August 31, 2018 2:03 PM
    Friday, August 31, 2018 1:38 PM

All replies

  • I'd ask for help over here.

    https://social.technet.microsoft.com/Forums/en-US/home?forum=win10itprogeneral

    https://social.technet.microsoft.com/Forums/en-US/home?forum=w7itprogeneral

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, August 31, 2018 12:08 PM
  • It appears that the "state" parameter can only be "inactive" or "all". The default, when "state" is not specified, is active (running).

    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    • Marked as answer by maxerist Friday, August 31, 2018 2:03 PM
    Friday, August 31, 2018 1:38 PM
  • It appears that the "state" parameter can only be "inactive" or "all". The default, when "state" is not specified, is active (running).

    Thanks, indeed, just checked, the sum of inactive + default = all. Interestingly, PsService, being the exact analogue regarding the parameters, supports "active" value

    Max

    Friday, August 31, 2018 1:50 PM