Install using sc.exe

sc.exe create Obsidian2Hugo4OldmansBull binPath="C:\repos\omb.obsidian2hugo\bin\Debug\net7.0\omb.obsidian2hugo.exe s=Oldmansbull v=c:\\users\\gary.armfield\\obsidian\\gary c=true p=false g=true" DisplayName="Obsidian to Hugo for OldMansBull" start=demand  
sc.exe create Obsidian2Hugo4OldmansBull binPath="C:\repos\omb.obsidian2hugo\bin\Debug\net7.0\omb.obsidian2hugo.exe" DisplayName="Obsidian to Hugo for OldMansBull" start=demand
  

An alternative example of installing the service pointing to a dev environment

sc.exe create IPeople.Roadrunner.Server binpath="C:\repos\IPeople.Roadrunner.Server\IPeople.Roadrunner.Service\bin\Debug\net7.0\IPeople.Roadrunner.Engine.exe" DisplayName="IPeople Roadrunner Server" start=demand  

It worked if you received

[SC] CreateService SUCCESS

Add a description to the service

sc.exe description Obsidian2Hugo4OldmansBull "Creates hugo website from Obsidian markdown files"  

Uninstall

sc stop "IPeople.Roadrunner.Server" sc.exe delete "IPeople.Roadrunner.Server"

It worked if you received

[SC] DeleteService SUCCESS