window 7 schedule time to shut down

Posted on 2011-05-05
Last Modified: 2012-05-11
is there any way to do a setting so the window 7 with auto shutdown every day on a schedule time. example 1900hrs
Question by:kianhow
    LVL 21

    Assisted Solution

    by:Joseph Moody
    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)
    LVL 6

    Accepted Solution

    You can also use Auto Shutdown. Works great in XP and it says it supports Win 7.
    LVL 18

    Assisted Solution

    by:Raheman M. Abdul
    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

    LVL 18

    Assisted Solution

    by:Raheman M. Abdul
    I have been using the above powershell script successfully on my network with Windows 7 PCs and Windows Server 2008.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
    This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now