PSEXEX tool
How can I get this script to work any ideas?
It comes back with a error code -1.....
@ECHO OFF
psexex @list.txt -u xxxx -p xxxx -c -f shutdown -r -f -t 300 -c "System will reboot in 5 minutes." > Results.log
2 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
anonymous_9363
9 years ago
Posted by:
dunnpy
9 years ago
I think some of your command line options are off.
Are you really copying (-c) and copying if already exists (-f) shutdown to the remote system?
See here for usage reference.
What about using PsShutdown instead?
Dunnpy
Are you really copying (-c) and copying if already exists (-f) shutdown to the remote system?
See here for usage reference.
What about using PsShutdown instead?
Dunnpy
Posted by:
stevobasquez
9 years ago
@ECHO OFF
psShutdown @list.txt -u admin34321 -p Cm0spr1m3 -r -f -t 300 -m "System will reboot in 5 minutes." >
Results.log
It restarted the device but for some reason the message isnt appearing what am I doing wrong?
Comments:
-
Message is not displayed because psShutdown sends the message to the session ID 0. Since WIndows VIsta session 0 has been reserved for the system services and as psTools works as a service it is isolated from the user's graphical interface (in general services can't display any messages in the user's environment).
You can read something more here:
http://blogs.technet.com/b/askperf/archive/2007/04/27/application-compatibility-session-0-isolation.aspx
You could try to find the user's session ID and then use psexec -i [session_ID_number] <<Shutdown command>> - rad33k 9 years ago-
True, a work around can be to send a popup message to everyone on the machine. - dedenker 9 years ago
psShutdown @list.txt -u admin34321 -p Cm0spr1m3 -r -f -t 300 -c "System will reboot in 5 minutes." >
Results.log - stevobasquez 9 years ago
psShutdown @list.txt -u admin34321 -p Cm0spr1m3 -r -f -t 300 -m "System will reboot in 5 minutes." >
Results.log - stevobasquez 9 years ago