Skip to content

Instantly share code, notes, and snippets.

@tjbenator
Created February 27, 2015 20:19
Show Gist options
  • Save tjbenator/1fc3225f20fc3d41f976 to your computer and use it in GitHub Desktop.
Save tjbenator/1fc3225f20fc3d41f976 to your computer and use it in GitHub Desktop.
Stop duplicate processes
PowerShell.exe -ExecutionPolicy Bypass -Command "& { get-process PROCESSNAME -ErrorAction SilentlyContinue | Sort-Object StartTime -descending | select Id, StartTime -skip 1 | stop-process }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment