Hi there iceman, Thank you for the welcome.
it does sound to me like you may have a hard drive fault, as when you scan or format both touch pretty much all sectors on your hard drive, and a fault on the drive can cause the computer to shutdown.
I would recommend you open My computer, Right click on the hard drive you're having trouble with and click properties, Go into tools and under the section that says Error-checking, click check now.
A little box will then pop up, put a tick in both:
Automatically fix file system errors
Scan for and attempt recovery of bad sectors.
Then click start. (Make sure all programs are closed, and the computer isn't used while the scan proceeds)
I hope this helps some