My pc powers on for a few seconds then shuts down. After numerous startup attempts it posts, boots up and runs normally.
Are these automated "startup attempts" (aka boot-loop, and if so, how many restarts are happening before it boots) or are you having to push the power button for each successive attempt? If so, how long are you waiting between the "shut down" and pressing the power button. Sometimes boot-loop restarts can take ~5 seconds before the PC turns itself back on for another try.
Assuming 2 sticks of RAM, are both sticks in like-colored slots? (aka slots 1&3 OR 2&4). If 1&3 aren't working, have you tried with RAM in slots 2&4 instead?
How long did you run Memtest or Prime95? I've had errors only pop up after 19 hours of testing, even though I got system instability after less than 5 minutes with specific workloads.
Main: i5-3570K, ASRock Z77 Pro4-M, MSI RX480 8G, 500GB Crucial BX100, 2 TB Samsung EcoGreen F4, 16GB 1600MHz G.Skill @1.25V, EVGA 550-G2, Silverstone PS07B
HTPC: A8-5600K, MSI FM2-A75IA-E53, 4TB Seagate SSHD, 8GB 1866MHz G.Skill, Crosley D-25 Case Mod