Lock the screen powershell

C++
#this command will bring you to the lockscreen of your computer
#works in .ps1

rundll32.exe user32.dll, LockWorkStation
Source

Also in C++: