/build/static/layout/Breadcrumb_cap_w.png

Need to report on Windows Services, both startup type (either disabled, manual, or Automatic) and Service status (running or stopped) ?

Need to report on Windows Services,  both startup type (either disabled, manual, or Automatic)  and  Service status (running  or stopped) ?

 Can't find a way in KACE SMA  v10.2.234 to do this with Wizard, is it possible with SQL?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Kiyolaka 3 years ago
Third Degree Green Belt
0

Here's my cir for getting print spooler status.  You should be able to drop the -name spooler and have it get all services you will need to add an additional property to get the service names though 



ShellCommandTextReturn(cmd /c powershell.exe "get-service -name 'Spooler'|Select-Object -Property Status,StartType|format-List |Out-String |ForEach-Object {$_.Trim()}")



I haven't tested it but in theory it should look like this.


ShellCommandTextReturn(cmd /c powershell.exe "get-service|Select-Object -Property Name,Status,StartType|format-List |Out-String |ForEach-Object {$_.Trim()}")

Posted by: Nico_K 3 years ago
Red Belt
0

You need to do a few additional tasks here to collect these informations:
1. a Custom Inventory Rule to have an overview over both. An easy overview would bring the following:

ShellCommandTextReturn(cmd /q /c powershell (Get-Service) )
ShellCommandTextReturn(cmd /q /c powershell -command (Get-Service |Where-Object {$_.Status -eq "Running"}) )The first line only shows the services as a table with the status, the name and the displayname.
The second line is an example for only running services.
You obviosuly can do other rules to get only the running etc or multiple CIR for the different states
2. test the CIR
3. now you can report them

Please be aware that I did not test he commands as CIR but like that they should work

Please also be aware that the SMA 10.2 goes end of life in a few days so you URGENTLY should update to the latest version (11.1 as of today)

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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