@David-0, this command works for me on my Windows 11 box:

nircmd monitor off

These are the relevant docs for that nircmd function:

You could also consider this command:

MultiMonitorTool.exe /TurnOff 2

You'll need to make sure nircmd.exe or MultiMonitorTool.exe is in a folder referenced in your PATH environment variable. I just talked about that with @h6477801471 here: