commands
# port
netstat -ano | findstr :22
# process
tasklist | findstr "java"
# force stop process
tasklist /PID <PID> -t -f
# force stop multiple process
tasklist /PID <PID> /PID <PID> /F
# tail
gc -tail 10 -wait -encoding UTF8 ./info.log
# search process
Get-Process | Where-Object {$_.Name -like '*chrome*'} | Select-Object Id,Name,Path
winsw.exe
<service>
<id>service-id</id>
<name>service-name</name>
<description>service-description</description>
<executable><executable>
<arguments></arguments>
<startmode>Automatic</startmode>
<logmode>reset</logmode>
</service>
.\winsw.exe install
.\winsw.exe start
.\winsw.exe stop
.\winsw.exe uninstall