I've seen some threads similar to my problem but I guess mine is a little more unique. When I turn my PC on it turns on fully but after a bit of time sometimes 5 minutes sometimes an hour the computer will automatically turn off and by that I mean windows 10 will begin to shut down. The PC also turns on by itself at random times as well. I've tested the ram and hard drive and they seem to be good. I've listed the specs below and sadly I don't have a way to check the PSU. I used HWmonitor and it does display the voltage coming from the different pins in the PSU I also included that in the post that it will help. Any advice would be greatly appreciated thanks guys.
Operating System Windows 10 Pro 64-bit
CPU Intel Core i5 2500K @ 3.30GHz 39 °C Sandy Bridge 32nm Technology
RAM 8.00GB Dual-Channel DDR3 @ 665MHz (9-9-9-24)
Motherboard MSI P67A-C43 (MS-7673) (SOCKET 0) 41 °C
Graphics NVIDIA GeForce GTX 560 (Gigabyte) 42 °C
Hardware monitor
Voltage 0 3.38 Volts [0xD3] (+3.3V)
Voltage 1 1.19 Volts [0x95] (CPU VCORE)
Voltage 2 1.87 Volts [0x75] (VIN2)
Voltage 3 1.41 Volts [0x78] (VIN3)
Voltage 4 5.80 Volts [0x8A] (+5V)
Voltage 5 8.18 Volts [0x5D] (+12V)
Voltage 6 2.06 Volts [0x81] (VIN6)
Voltage 7 3.23 Volts [0xCA] (VSB3V)
Voltage 8 3.42 Volts [0xD6] (VBAT)
Operating System Windows 10 Pro 64-bit
CPU Intel Core i5 2500K @ 3.30GHz 39 °C Sandy Bridge 32nm Technology
RAM 8.00GB Dual-Channel DDR3 @ 665MHz (9-9-9-24)
Motherboard MSI P67A-C43 (MS-7673) (SOCKET 0) 41 °C
Graphics NVIDIA GeForce GTX 560 (Gigabyte) 42 °C
Hardware monitor
Voltage 0 3.38 Volts [0xD3] (+3.3V)
Voltage 1 1.19 Volts [0x95] (CPU VCORE)
Voltage 2 1.87 Volts [0x75] (VIN2)
Voltage 3 1.41 Volts [0x78] (VIN3)
Voltage 4 5.80 Volts [0x8A] (+5V)
Voltage 5 8.18 Volts [0x5D] (+12V)
Voltage 6 2.06 Volts [0x81] (VIN6)
Voltage 7 3.23 Volts [0xCA] (VSB3V)
Voltage 8 3.42 Volts [0xD6] (VBAT)