The power supply is straightforward to replace and this is a good budget unit. It uses less power and generates less heat and noise than the OEM unit. You might want to invest in a right-angle SATA power adapter, too.
BTW when you say your desktop turns off, does it flash a "blue screen of death" before that happens or does it just turn off? Do you get a Windows error message when you reboot?