Power-saving features in desktop computers should be used to let the computers go to sleep when they're not in use. This saves energy, and, while keeping your electricity costs lower, also helps minimize pollution. There are cases, however, when you need to prevent your PC from going to sleep - such as when you need to make sure it stays on so you can access it remotely.
Below are the steps you can take to keep your Windows 7 and Windows 8 PC awake (screenshots below are from Windows 8 and may look slightly different for Windows 7 computers):
Open Control Panel and navigate to Power Options.
Tip: If you don't see Power Options, you may be in Category View (as below) - click on the drop-down in the upper right corner of the Control Panel and switch to Large Icon view.
Click on "Change plan settings" for the currently selected plan, then click on the drop-down next to "Put the computer to sleep", under "Plugged in", and set that value to "Never":
Click on Save Settings:
And that's it. Now your PC will not go to sleep while it's plugged in. When the need to keep it permanently awake is over, go back to the same place and click on Restore default settings for this plan link at the bottom of the Edit Plan Settings screen to enable power-saving features.