If you are using a desktop computer, chances are that you don't want the computer to go to sleep automatically. This is even more the case if you are running Windows 7 or Vista in a virtual machine for testing purposes.

Disabling Power Management in Windows 7

Start by clicking on the power icon, and open up the More power options:

Under the "Additional plans" section, select High Performance, then "Change plan settings":

Then change everything to "Never", and save the changes:

Disabling Power Management in Vista

Disabling power management is simple and easy. First go to the start menu and click on the Control Panel.

Click on the System and Maintenance link:

Then click on the Power Options link:

Then select High Performance:

This will disable the automatic sleep mode, but will still turn off the display. You can click on Change Plan Settings to disable that as well if you want.