The PowerShell command below turns off the screen when run from a batch file (or command prompt). I would prefer to run this as a PowerShell script.
Turn Off Screen - TechNet Script Center
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)
I looked at Add-Type - Microsoft Docs, but I could not get the parameters correct.
What is the equivalent PowerShell script for this?