Q:

Is it possible to force to kill windows service using Octopus?

My octopus installs Windows Service in a machine, but sometimes it can't stop the service so it doesn't deploy.
If I manually go to the machine and try to stop the service, I can't. But if I first go to Task Manager and kill the process of the service, then I can stop the service.
Does Octopus already have a built-in feature to do this for me? Or should I create a .bat to execute it before reinstalling windows service?

A:

Same to Ryan's process, we use the command in this format to kill process that would not gracefully shutdown
taskkill /im Processname /f

Just a note, this takes Process Name not Service Name, and all services share the same process name will be killed.  

A:

You could try using a custom powershell pre-deployment script (enable the custom deployment scripts feature for your deployment step) or by placing this in a predeploy.ps1 file in your nuget package.
kill -processname serviceName

A:

If you import the step template Stop Service With Kill you can add this as a deployment step.
The documentation here provides a step by step way to do this

