tiras gans
asked on
Need to kill the procexp64.exe
People leave the process running and I like to schedule to kill it every night. I know its very easy with SysInternals, would be "pskill procexp". How can I script it for all the server in one script and put that script into the schedule.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using procexp64 so I put
[for %i in (C:\path\server.txt) do pskill \\%i procexp64]
Still not killing for some reason..
[for %i in (C:\path\server.txt) do pskill \\%i procexp64]
Still not killing for some reason..
ASKER
Make sure that the default admin$ share is enabled on C:\path\server.txt.
hmmm
hmmm
ASKER
it tells me same on every system even though the Admin$ is enabled.
ASKER
removed \\%i and works now from the command like but not as batch. weird!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
like this?
for %%i in (C:\path\server.txt) do pskill \\%%i procexp64
pause
for %%i in (C:\path\server.txt) do pskill \\%%i procexp64
pause
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
not working :-((
ASKER
If you have any idea on how to troubleshoot here let me know.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Still not killing even from the command line.
When I do like this its working. But not from \\servername procexp64. Weird.
C:\Procexp>pskill procexp64
PsKill v1.13 - Terminates processes on local or remote systems
Copyright (C) 1999-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
Process procexp64 killed.
When I do like this its working. But not from \\servername procexp64. Weird.
C:\Procexp>pskill procexp64
PsKill v1.13 - Terminates processes on local or remote systems
Copyright (C) 1999-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
Process procexp64 killed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, I have Admin privileges and access to the server. pslist:
C:\Procexp>pslist \\server1
pslist v1.29 - Sysinternals PsList
Copyright (C) 2000-2009 Mark Russinovich
Sysinternals
Cannot connect to remote registry on server1
Access is denied.
Failed to take process snapshot on server1.
Make sure that the Remote Registry service is running on the remote system, that
you havefirewall ports allow RPC access, and your account has read access the f
ollowing key on the remote system:
HKLM\Software\Microsoft\Wi ndows NT\CurrentVersion\Perflib
**Server name edited out per OP request.**-JARmod101
C:\Procexp>pslist \\server1
pslist v1.29 - Sysinternals PsList
Copyright (C) 2000-2009 Mark Russinovich
Sysinternals
Cannot connect to remote registry on server1
Access is denied.
Failed to take process snapshot on server1.
Make sure that the Remote Registry service is running on the remote system, that
you havefirewall ports allow RPC access, and your account has read access the f
ollowing key on the remote system:
HKLM\Software\Microsoft\Wi
**Server name edited out per OP request.**-JARmod101
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
same thing... The account I am using has domain admin privileges.
Drive mapping not working either?
ASKER
I think there is an issue with local shares.
When i go \\server1 from the same server1 it promts me for the logins. If I do from \\server2 from server1 it works file. Same as vice versa for other shares. That could be an issue.
When i go \\server1 from the same server1 it promts me for the logins. If I do from \\server2 from server1 it works file. Same as vice versa for other shares. That could be an issue.
Yes, this is most likely the issue, I already concluded that the script itself was working just fine.
ASKER
Yes, let me address that portion.
C:\Procexp>pskill \\server1 procexp64
PsKill v1.13 - Terminates processes on local or remote systems
Copyright (C) 1999-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
Process procexp64 killed on server1.
So it works from the command line. It doesn't work inside the script though.
C:\Procexp>pskill \\server1 procexp64
PsKill v1.13 - Terminates processes on local or remote systems
Copyright (C) 1999-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
Process procexp64 killed on server1.
So it works from the command line. It doesn't work inside the script though.
From server1 to server1? Then you dont need \\server1, just pskill procexp64 - can you test that (on server1)?
ASKER
No from server1 to other servers.
========================== ========== =========
for /f %%i in (servers.txt) do echo pskill \\%%i procexp64
pause
========================== ========== ==========
==========================
for /f %%i in (servers.txt) do echo pskill \\%%i procexp64
pause
==========================
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes perfect works now. Just need to find out why doesn't work on the same machine..
ASKER
One more question. How can I make it run on the background? So users do not see it when its scheduled?
ASKER
Nevermind there is an option Hidden in the Task Manager in Windows 2008 Server. That should take care I assume.
Thanks!
Thanks!
ASKER