Skip to content

Instantly share code, notes, and snippets.

@jahe
Last active January 29, 2021 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jahe/247f643bd36767ccc401 to your computer and use it in GitHub Desktop.
Save jahe/247f643bd36767ccc401 to your computer and use it in GitHub Desktop.
Batch Cheatsheet
REM Display text file in shell
type config.json
REM Show running processes
tasklist
REM Kill process bei PID
taskkill /pid 1060
REM Get Command Line and PID of one process
wmic process where caption="test.exe" get commandline,processid
REM Kill process by Command Line
wmic process Where "CommandLine Like '%-jar selenium-server.jar%'" Call Terminate
REM Open RDP session with username + password
cmdkey /generic:"hostnameXY" /user:"peter" /pass:"123"
mstsc /v:hostnameXY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment