script to stop SQLcmd.exe

I need a script that stops SQLcmd.exe.  This program regularly gets "hung" on several of our machines and I am going to run it as a scheduled job.
bbitadminAsked:
Who is Participating?
 
Duncan RoeSoftware DeveloperCommented:
The command you want is taskkill, as in
taskkill /im SQLcmd.exe

Open in new window

This atttempts to kill all processes with image name SQLcmd.exe.
You may also want to use switches /F (force terminate) and / or /T (process tree) - type taskkill/? to get a full list.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.