1

I wanted to List all the SQL Services including Reporting Services.

Wmic service where (PathName like '%Binn\%sql%') get caption, name, startmode, state, PathName, ProcessId

This one will give all except SSRS. anyone have an idea how for that as well.

1
  • SimonS gives a good answer. If you want to know why SSRS was left out of your results, it seems to be because SSRS is installed in a bin directory instead of binn. (And this is why relying on a path is iffy. Microsoft, in future versions, is much more likely to change where an executable is installed than they are to change the name of the service.)
    – Doug Deden
    Commented Mar 1, 2019 at 21:14

1 Answer 1

1

You can edit the wmic and filter the Service Name instead of the path.

Wmic service where (Name like '%sql%') get caption, name, startmode, state, PathName, ProcessId

or in PowerShell (I'd suggest you to use this approach)

Get-Service *sql*

this will return all Services that have SQL in their name.

you can also use this from cmd like so: powershell "Get-Service *sql*"

Example Output:

PS C:\Windows\system32> get-service *sql*

Status   Name               DisplayName
------   ----               -----------
Running  MSOLAP$SDFSF       SQL Server Analysis Services (XXXXX...
Running  MSSQL$SDFSDFS      SQL Server (XXXXXXXXXX)
Running  MSSQL$SDFSDF       SQL Server (XXXXX)
Running  MSSQLFDLauncher... SQL Full-text Filter Daemon Launche...
Running  MSSQLLaunchpad$... SQL Server Launchpad (XXXX)
Running  ReportServer$BB... SQL Server Reporting Services (XXXX...
Stopped  SQL Server Dist... SQL Server Distributed Replay Client
Stopped  SQL Server Dist... SQL Server Distributed Replay Contr...
Stopped  SQLAgent$xxxxxx... SQL Server-Agent (xxxx1)
Stopped  SQLAgent$xxxxx     SQL Server Agent (xxxxx)
Running  SQLBrowser         SQL Server Browser
Running  SQLTELEMETRY$BB... SQL Server CEIP service (xxxx)
Running  SQLTELEMETRY$xxxxx SQL Server CEIP service (xxxxx)
Running  SQLWriter          SQL Server VSS Writer
Running  SSASTELEMETRY$B... SQL Server Analysis Services CEIP (...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .