August 3, 2012

Helpful Windows commands

I'm more familiar with Linux/Unix environment -- and I find the following Windows commands very helpful:

"grep"

$ netstat -a | grep 8080


C:\> netstat -a | find -i "8080"


Killing Process

C:\> wmic PROCESS where "commandline like 'C:\MyConsoleApp\%run.exe%'" delete

(See here for more about "wmic")

List Running Services

C:\> service where state="Running"