A friend complained that her relatively new PC was intermittently powering itself off and she was getting desperate. So she put it in the car and paid me a Sunday visit. Set it up and waited - and sure enough after a while it suddenly powered down.
Opened it up to reveal an almost pristine insides. Then I accidentally brushed my hand against he cpu heatsink - ouch! The problem was then obvious - a unsecured wire was stopping the cpu fan from rotating. Re-routing the wire then showed that the fan was dead from being stalled for months.
As the shops were all closed it was a case of rummaging in the spares box. Luckily the fan was only held by screws into the heatsink fin gaps - so a jury rig of a slightly bigger diameter fan was secured with only two screws. Apparently it then worked perfectly for the life of the PC.