Thursday, January 16, 2014

Taskmanagement in powershell

My favorite commands tasklist and taskkill are getting old. Time to get on the powershell bandwagon now when xp is losing its supported-status.

For tasklist-like results

/>get-process |where-object {$_.processname –like msiexec}

Where msiexec is queried process

For taskkill-like results

/>stop-process –name notepad

Where notepad is process to be killed.

Also nice to have


Which is pretty obvious. Restart immediatly on default. Use with scheduler for more use.

References: - restart-computer - stop process - stop process - get process - restart-computer enhancements in ps3.0

No comments: