There was a problem with Windows 11 where by typing the letter "S" at the command prompt caused immediate shutdown of the computer. I traced it to a file named "S.cmd" in c:\windows\system32\,That file contains a one line shutdown command. This is clearly not a part of Windows and is a rogue file that should be removed.