Is there any way that one can lock a desktop computer remotely? For example, if one accidently leaves a computer logged on, would there be a way to lock that computer using Remote Connection (VPN)?
Use PsExec to invoke:
rundll32.exe user32.dll, LockWorkStation
on your remote PC.
If you are currently on PC_A and want to lock PC_B, type this on your command line (on PC_A):
psexec \\\PC_B -u user -p pass "rundll32.exe user32.dll, LockWorkStation"
This way rundll32.exe user32.dll, LockWorkStation
will be invoked on PC_B.
You can create a file with an arbitrary name and the suffix bat use this code in bat file
rundll32.exe user32.dll, LockWorkStation
save and run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With