Command to Stop or Restart Octoprint in Windows

Continuing the discussion from Setting up OctoPrint on Windows:

I successfully installed OctoPrint on Windows, following Gina's instructions and Python's 3.9.
I'm able to access the server and connect to the printer, everything good.
I installed then a plugin for Bed Leveling and I'm not able to see it in Octoprint in plugins.
I suppose I have to restart Octoprint in order to be able to see the plugin.
I'm wondering what is the procedure (or Command) that I can use (in Windows) to Stop or Restart Octoprint only?

In the top navbar, you should have some icons.

One is for the system:

grafik

These don't show up in windows installs by default. I personally created a batch file to kill octoprint and then start it back up, I create a batch file in the venv\Scripts folder named restart and then in OctoPrint's settings put in the full path to that bat file.

@if octoprint.==. (goto error) ELSE (goto restart)

:restart
@taskkill /f /im octoprint.exe >nul
@timeout /t 3 /nobreak >nul
@start octoprint.exe serve >nul
@echo restart complete
@goto exit

:error
@echo Oops... something went wrong!
@goto exit

:exit
@echo off
for /F "tokens=2" %%i in ('date /t') do set mydate=%%i
set mytime=%time%
@echo Completed at %mydate%:%mytime%
2 Likes