This functionality is still in beta testing and was added in 2025
netexec rdp ip -u user -p password -x whoami
You can also add the flag --cmd-delay and --clipboard-delay to increase the time if the target is very slow:
--cmd-delay
--clipboard-delay
The use of -x option will disconnect the target user if connected (like a lock), not logoff therefore no work is lost and no application is closed.
Last updated 6 months ago
Was this helpful?