Taskkill Error Access denied

Taskkill Error Access denied

1. Open the Command prompt window with Administrator right.

First check Command prompt is open with administrator right with right click on it.
(RUN AS ADMINISTRATOR)

2. Check with the process user from which it’s running.

tasklist /V

-- Output in Excel Sheet
tasklist /V /FO CSV > E:\output.csv

Output Sample:
--------------
"oracle.exe","10124","Services","0","404,584 K","Unknown","NT AUTHORITY\SYSTEM","0:18:22","N/A"
"conhost.exe","7716","Services","0","500 K","Unknown","NT AUTHORITY\SYSTEM","0:00:00","N/A"

3. Try to kill it.

C:\Users\e3019447>taskkill /F /PID 10124
ERROR: The process with PID 10124 could not be terminated.
Reason: Access is denied.

C:\Windows\system32>TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /PID 10124
SUCCESS: The process with PID 10124 has been terminated.

OR

TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM oracle.exe

OR

wmic process where name='oracle.exe’ delete

Different Syntax provided by Microsoft to use the Commands:

TASKKILL Commands : TASKKILL /?

TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM oracle.exe
TASKKILL /S system /U AMERIFIRST\tron /FI "USERNAME ne NT*" /IM oracle.exe
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

TASKLIST Commands: TASKLIST /?

TASKLIST /M notepad.exe
TASKLIST /V /FO CSV
TASKLIST /SVC /FO LIST
TASKLIST /M wbem*
TASKLIST /S system /FO LIST
TASKLIST /S system /U domain\username /FO CSV /NH
TASKLIST /S system /U username /P password /FO TABLE /NH
TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq running"

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.