PC power supplies do fail occasionally. While you may never own the same PC long enough to have a failure, it isn't unusual for a PC aged one to three years to need a replacement. Power supply failures don't necessarily have to be total. Sometimes the power supply will appear to function but the PC experiences difficulty starting or random, sudden crashes. These are some symptoms that can result from a failing power supply.
Caution: please read our safety information.
Before opening the case, turn off and unplug the PC to avoid an electrical shock hazard. Exercise caution as there are sharp edges inside the PC and its components. Always wear a static electricity discharge strap and attach the lead to the metal frame of the case, when working with your PC's components to avoid damaging your PC. Note that some manufacturers will void your PC's warranty if you open the case.
The power supply is easily replaced. The key considerations for choosing a replacement are that the old one is removable (it almost always is), that it has the appropriate power connectors for your motherboard and that it supplies enough power for your PC's needs. See the overview for more information on selecting a power supply. 
- Unplug      the PC
- Disconnect      all wires from the back of the PC
- Remove      the case
- Unplug      the power supply from the motherboard and each of the devices
- Disconnect      the ware from the on/off switch (or remove the entire switch)
- Remove      the power supply's retaining screws
- Remove      the power supply
- Install      the new power supply
- Connect      the switch
- Plug      in the motherboard
- Plug      in each of the devices
- Replace      the cover 
- Plug      in the PC
That's it! No other configuration or changes are necessary.