iMac keeps randomly restarting
My iMac keeps restarting every time I turn it on. Sometimes it doesn't get to the desktop before restarting and other times it restarts while using it.
I have already replaced the power supply with the same result. I also have tried unplugging both the HDD and the SSD and it still was restarting. I have tried switching out the RAM from another iMac and it still restarts.
When it restarts, it randomly shuts off and then boots again, sometimes over and over.
I have already taken it to an authorized Apple tech, and they told me they could never get it to reboot... the closet Apple Store is over 3 hours away so I am trying to troubleshoot this myself.
Any ideas on what I can try next? Thanks for your help!