To lock your computer from PowerShell, remember that you can launch applications, including rundll32.exe, which can be used to call methods from inside DLL files:
rundll32.exe user32.dll, LockWorkStation
To lock your computer from PowerShell, remember that you can launch applications, including rundll32.exe, which can be used to call methods from inside DLL files:
rundll32.exe user32.dll, LockWorkStation