Finding the Service Name–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

A quick one today, and this one I remembered without looking anything up.

I recently needed the service name to kill it for a test. I was using the sc.exe command line and couldn’t get it to give me the SQL Agent service name. I could have hit Windows, typed services, scrolled down, found the Agent, right clicked it, selected properties, and gotten the name.

Or I could do this:

Get-Service | Where {$_.Name –Like ‘SQL*’}

That worked and I could quickly see all the names.

2017-04-18 11_19_49-cmd - powershell (Admin)

The only thing that threw me was I forgot the hyphen before “like”. One of these days I’ll actually remember that.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s