window 7 schedule time to shut down

is there any way to do a setting so the window 7 with auto shutdown every day on a schedule time. example 1900hrs
Who is Participating?
You can also use Auto Shutdown. Works great in XP and it says it supports Win 7.
Joseph MoodyBlogger and wearer of all hats.Commented:
Yes. Set a scheduled task and set it to run whether a user is logged in or not. Make the condition so that it runs everyday at the time you want to shut it down.

The command you will use in the task is:

shutdown.exe -s -f -t 0
 -s= shutdown (not really needed)
-f= force (close open applications
-t= time to wait (measured in seconds)
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
Save the following as   shutdown.ps1  (powershell script)
if((get-process "explorer" -ea SilentlyContinue) -eq $Null)
invoke-expression "C:\windows\system32\Shutdown.exe /f /s /t 1"
{ "Do Nothing" }

From the task scheduler: create a new task with the following details:

In Actions: Start a Program:    cmd.exe
Under arguments : /C C:\ShutdownSoft.bat

Run the schuleded program every 19:00 hours

ShutdownSoft.bat should contain the following commands

powershell.exe set-executionpolicy unrestricted
powershell.exe C:\ShutdownSoft.ps1

Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
I have been using the above powershell script successfully on my network with Windows 7 PCs and Windows Server 2008.
kianhowAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.