To some people, the apparent lack of the computer locking function during Remote Desktop Connection is a major flaw. This would be the case, if it were true. Though the standard Windows key + L does not work during a Remote Desktop Connection, you have the ability to save a shortcut to your desktop that will allow you to lock the computer.
1. Create Shortcut:- Right-click on your desktop, select "New," then "Shortcut."
2. Type the location of the item:- Type "rundll32 user32.dll,LockWorkStation" into the "Type the location of the item" text field, then click "Next.".
3. Type a name for your shortcut:- Type a name for your shortcut into the "Name" text field (e.g., "Lock Computer") and then click "Finish."
4. Double-click on your new shortcut:- Double-click on your new shortcut to lock your computer. This will work even from a Remote Desktop Connection.
Also consider using Action1 to lock remote computer if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.