Blog Post

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.

Filed under: Blog Tagged: powershell, SQLNewBlogger, syndicated

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating