Script To Lock Windows 10. Here's the CMD command you should use to lock the computer. I tried