I am a beginner.I just went curious about cmd so I want to make a batch file that kills the active windows and shutdown/restart the computer safely. I came across commands like-
taskkill /im "program.exe"
tasklist
shutdown -s
But I want to close all active windows but not forcefully. If there a specific command or some combination of commands please do mention. Thanks in Advance.
PS- I came across powershell but I want to know if i can achieve this using batch file (cmd commands) .Below is the link