Question Help with PSEXEC

Santiago Andrea

Reputable
Mar 4, 2022
40
0
4,540
Please keep it to 1 thread.
I need to execute an instruction on a remote machine (LAN).
How do I configure both machines? tried remote user on remote pc but it doesn't work. Both machines work Remote Desktop
Thank you
 
More information needed: what instruction for example?

Forum rules prohibit assistance with doing homework problems.

Your question may not be homework but there is no way to really know from this end.

What you must do is provide much more information along with what you believe is the reason the instruction does not work.

Show and explain what you have tried and tested thus far. What were the results of those "try's" and tests?

Present what you believe are possible solutions and the basis for your beliefs.

Provide and/or cite references as necessary.

Then request assistance.
 
how to use PSExec to logoff guest session on a remote pc within a lan, I already tried with logoff shutdown -l, but it doesn't work, I also tried running a .bat as admin but neither or some other software that can do it, the remote pc has admin and a guest account, all commands work except the one i need, thanks
 
Thanks !
psexec \\MiniOS -u santiago -p 123 ipconfig
-Work

psexec \\MiniOS -u santiago -p 123 logoff
-The current session ID could not be closed, error code 1
-Error [1]: Incorrect function.
-logoff exited on MiniOS with error code 1.

psexec \\MiniOS -u santiago -p 123 shutdown -l
-Error [1]: Incorrect function.
-logoff exited on MiniOS with error code 1.

C:\>psexec \\MiniOS -u santiago -p 123 psshutdown.exe -o
-Work (but the computer shuts down)