Skip to content

Instantly share code, notes, and snippets.

@Serrin
Forked from jahe/batch-cheatsheet.bat
Created June 22, 2016 13:39
Show Gist options
  • Save Serrin/08b41a8faa94b522407012fb99039517 to your computer and use it in GitHub Desktop.
Save Serrin/08b41a8faa94b522407012fb99039517 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