How to lock and turn off monitor in windows 10

I found how to turn off screen in windows 10 using pwoershell using batch script.

Create a .bat file with below script and execute the file using double click it. It will invoke the powershell and send message to hardware to turn off the monitor.

To wake up the display back, just press any key or move the mouse.

powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)

Tags: Windows 10, Powershell, Turn Off Monitor, Display