Skip to main content

Homepage Header Links

  • About ENERGY STAR
  • Partner Resources

Homepage Header Search box

 
ENERGY STAR
  • Energy Efficient Products

    energy efficient products

    ENERGY STAR products are independently certified to save energy without sacrificing features or functionality. Saving energy helps prevent climate change. Look for the ENERGY STAR label to save money on your energy bills and help protect our environment.

    • Find ENERGY STAR Products
    • Energy Savings at Home
    • Take the Pledge
    • Learn about Climate Change

    • Ways to Save

    • Tax Credits

    • Ask an Expert

    • Heat and Cool Efficiently

    How can we help you?

    • Where can I find the best prices on ENERGY STAR products?
    • What rebates are available on ENERGY STAR products?
    • How can I save energy with a smart thermostat?
    • What type of light bulb should I choose?
    • I want to learn more about energy efficiency

    Quick Links

    • Where does my money go?
    • Set and Save with ENERGY STAR
    • Product Finder
    • Rebate Finder
    • Best Value Finder
    • Find ENERGY STAR Products
    • Energy Savings at Home
    • Take the Pledge
    • Learn about Climate Change
  • Energy Savings At Home

    energy savings at home

    Improving your home's energy efficiency with ENERGY STAR can help to lower high energy bills, improve comfort and reduce greenhouse gas emissions. Learn about the many ways to save in your home and track your progress with "My ENERGY STAR" - your new dashboard to savings.

    • Start Saving Now
    • Take the Pledge
    • Home Assessment Tools
    • Seal and Insulate Your Home
    • Learn about ENERGY STAR Products
    • Learn about Home Performance with ENERGY STAR

    • Ways to Save
    • Happy couple looking at ENERGY STAR Home Advisor on their laptop
      Home Assessment Tools

    • Heat and Cool Efficiently

    • Tax Credits

    How can we help you?

    • I want help with improving my home's comfort and efficiency
    • How can I heat and cool my home efficiently?
    • How can I stop drafts?
    • I'd like to know about power management for my computer.
    • How do I choose the right lighting for my home?
    • I'm upgrading my kitchen appliances. What should I know?
    • I want to learn more about energy efficiency

    Quick Links

    • Home Improvement FAQs
    • HVAC Maintenance Tips
    • For Home Improvement Contractors
    • ENERGY STAR Choose a Light Guide
    • My ENERGY STAR Dashboard
    ​
    • Start Saving Now
    • Take the Pledge
    • Home Assessment Tools
    • Seal and Insulate Your Home
    • Learn about ENERGY STAR Products
    • Learn about Home Performance with ENERGY STAR
  • Energy Efficient New Homes

    new homes & apartments

    A new home or apartment that has earned the ENERGY STAR label has undergone a process of inspections, testing, and verification to meet strict requirements set by the US EPA. ENERGY STAR certified homes and apartments use significantly less energy than typical new homes and apartments while delivering better comfort, quality, and durability.

    • Find Builders and Incentives
    • Home Features and Benefits
    • Homeowner Testimonials
    • Resources for Partners

    • Find ENERGY STAR Home Builders

    • ENERGY STAR
      Home Features
      and Benefits

    • Homeowner Testimonials

    • Find an Energy Efficient Apartment

    How can we help you?

    • Features of an energy efficient new home
    • Benefits of living in an ENERGY STAR certified home
    • I want to buy an ENERGY STAR certified home
    • I want to construct an ENERGY STAR certified home
    • I want to find an ENERGY STAR apartment
    • I want to learn more about energy efficiency

    Quick Links

    • Builder and Incentive Locator
    • In the News
    • Green Homes and ENERGY STAR
    • Energy Efficient Mortgage Programs
    • Find Energy Efficient Certified Apartments and Condos
    • Find Builders and Incentives
    • Home Features and Benefits
    • Homeowner Testimonials
    • Resources for Partners
  • Energy Strategies for Buildings & Plants

    buildings & plants

    Improve financial performance and reduce carbon emissions with EPA's strategic energy management approach.

    • Facility Owners & Managers
    • Service Providers
    • Energy Efficiency Program Administrators
    • Tenants
    • Tools & Resources

    • Portfolio Manager
    • Find Certified Buildings

    • National Building Competition

    • Find Expert Help

    How can we help you?

    • Build an energy program
    • Improve buildings & plant performance
    • Earn the ENERGY STAR & other recognition
    • Benchmark energy use
    • ENERGY STAR in action
    • Communicate & educate
    • I want to learn more about energy efficiency

    Quick Links

    • Portfolio Manager
    • Target Finder
    • Plant EPIs
    • Commercial Food Service
    • Tools & Resources
    • Facility Owners & Managers
    • Energy Efficiency Program Administrators
The simple choice for energy efficiency.

You are here

Home » Certified Products » Ways to Reduce IT Energy Costs » Implementation Resources for Enterprises » Using Windows Task Scheduler to put PCs into standby or hibernate mode

Certified Products

Products that earn the ENERGY STAR are independently
certified to save energy, save money and protect the climate.
  • All Certified Products

    Appliances

    • Air Purifiers (Cleaners)
    • Clothes Dryers
    • Clothes Washers
    • Commercial Clothes Washers
    • Dehumidifiers
    • Dishwashers
    • Freezers
    • Refrigerators

    Building Products

    • Residential Windows, Doors and Skylights
    • Roof Products
    • Seal and Insulate
    • Storm Windows

    Commercial Food Service Equipment

    • Commercial Coffee Brewers
    • Commercial Dishwashers
    • Commercial Fryers
    • Commercial Griddles
    • Commercial Hot Food Holding Cabinets
    • Commercial Ice Makers
    • Commercial Ovens
    • Commercial Refrigerators & Freezers
    • Commercial Steam Cookers

    Data Center Equipment

    • Data Center Storage
    • Enterprise Servers
    • Large Network Equipment
    • Small Network Equipment
    • Uninterruptible Power Supplies

    Electronics

    • Audio/Video
    • Digital Media Player
    • Set-top Boxes
    • Signage Displays
    • Slates and Tablets
    • Telephones
    • Televisions

    Heating & Cooling

    • Air-Source Heat Pumps
    • Boilers
    • Central Air Conditioner
    • Commercial Boilers
    • Ductless Heating & Cooling
    • Furnaces
    • Geothermal Heat Pumps
    • Light Commercial Heating & Cooling
    • Room Air Conditioner
    • Smart Thermostats
    • Ventilation Fans

    Lighting

    • Ceiling Fans
    • Decorative Light Strings
    • Light Bulbs
    • Light Fixtures

    Office Equipment

    • Computers
    • Imaging Equipment
    • Monitors
    • Voice over Internet Protocol (VoIP) Phones

    Other

    • Electric Vehicle Supply Equipment (EVSE)
    • Laboratory Grade Refrigerators and Freezers
    • Pool Pumps
    • Vending Machines
    • Water Coolers

    Water Heaters

    • Commercial Water Heaters
    • Heat Pump Water Heaters
    • High Efficiency Gas Storage Water Heaters
    • Solar Water Heaters
    • Whole Home Tankless Gas Water Heaters
  • Appliances
  • Lighting
  • Office Equipment
  • Electronics
  • Product Specifications Search

Using Windows Task Scheduler to put PCs into standby or hibernate mode

Scheduled tasks can be used to put computers into standby or hibernate mode using a combination of VBScript and PsShutdown from Microsoft (formerly from Sysinternals) — provided users are logged off. PsShutdown can be downloaded from Microsoft’s website.

This method has an advantage over using Power Policies to control power management: you can force logged-out PCs to go into standby mode, while allowing users to control their own Power Policies when logged on.  However, forcing PCs into standby mode should only be necessary only if the ability for applications to veto sleep mode has been enabled through group policy.  If this setting has been enabled you may want to talk to you network administrator about the group policy settings.

Scheduling the Task

In the following example a task is set to run every hour. This scheduled task will put logged-off computers into standby mode, without disturbing computers that have users logged on. If users don’t have rights to schedule tasks, the script can be run as a computer logon script in Group Policy. This schedule is only one example. Tasks could be scheduled to run every half hour between 5 pm and 7 am, for example. To see all options for scheduling tasks type "schtasks.exe /?" without the quotes in a command prompt on the computer that will be scheduling the tasks (the client computer if the tasks are being scheduled through a logon script.)

SCHTASKS.exe /Create /S %computername% /RU "SYSTEM" /ST 00:00:00 /SC HOURLY /SD 01/01/2007 /TN "StandBy" /TR "cscript.exe C:\ValidPath\standby-hibernate.vbs

The Script

This script assumes that PsShutdown.exe exists in the %windows% directory. The directory can be changed to any valid path where PsShutdown.exe exists and is accessible by the computer’s SYSTEM account.

'** Script Name: "standby-hibernate.vbs" **
Option Explicit
On Error Resume Next
Dim strComputer, sUserName, bLoggedOn, bReboot, objWMIService, 
	colComputer, objComputer
Dim bStandby, objShell
strComputer = "."

Set objShell = WScript.CreateObject("Wscript.Shell")
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer 
	& "\root\cimv2") 
Set colComputer = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
 
For Each objComputer in colComputer
	sUserName = objComputer.UserName
	'WScript.Echo "UserName:  " & objComputer.UserName
 	If sUserName  <> "null" Then
 		bLoggedOn = True
 	End If
Next

If Err = 0 Then
	If bLoggedOn Then
		WScript.Echo strComputer & " 
			is not Logged Off."
		bStandby = False
	Else
		WScript.Echo strComputer & " 
			is Logged Off."
		bStandby = True
	End If
Else
	WScript.Echo "Error accessing computer:  " 
		& strComputer
	bStandby = False
End If	
On Error Goto 0

WScript.Echo "bStandby:  " & bStandby
	
If bStandby = True Then
	WScript.Echo "Going into standby..."
	'Go to standby
	objShell.run "%windir%\psshutdown.exe -d -accepteula", 
		0, False
Else
	WScript.Echo "Not going into standby..."
End If

		

Quick Links

  • Data Center Equipment
  • 5 Simple Ways to Cut Energy Waste
  • More Ways to Save in Data Centers

Main menu

  • Energy Efficient Products
    • Find ENERGY STAR Products
    • Energy Savings at Home
    • Take the Pledge
    • Learn about Climate Change
  • Energy Savings At Home
    • Start Saving Now
    • Take the Pledge
    • Home Assessment Tools
    • Seal and Insulate Your Home
    • Learn about ENERGY STAR Products
    • Learn about Home Performance with ENERGY STAR
  • Energy Efficient New Homes
    • Find Builders and Incentives
    • Home Features and Benefits
    • Homeowner Testimonials
    • Resources for Partners
  • Energy Strategies for Buildings & Plants
    • Facility Owners & Managers
    • Service Providers
    • Energy Efficiency Program Administrators
    • Tenants
    • Tools & Resources

Homepage Footer last menu

  • ENERGY STAR Home
  • About ENERGY STAR
  • Recursos en Español
  • Publications
  • Partner Resources
  • Contact Us | FAQs
  • Newsroom
  • Kids
  • Privacy
  • US EPA logo
    EPA Home
  • US DOE logo
    DOE Home