My computer is about 1 years old. Its has an HP EliteBook 2540p and an Intel i5. My problem is that my computer suddenly and randomly switches off on its own. There is no blue screen, no error messages, the pc just goes off as though somebody pulled the plug. The motherboard power indicator LED remains ON. It might happen anytime from within 5-10 mins of starting up, to maybe an hour or two later. Sometimes it works perfectly fine and never turns off. And once it shuts itself off, i can't power it back on. If i pull the plug and try again later or shake up the chassis a but and retry, it might boot up again and run for some random period of time before the same story repeats. sometimes i remove the beettery and restart then it going to starts.
Please help me to my issue.

When a lappie does that it is almost always a heat problem. If you must use it on your lap, keep your legs apart. On a desk - prop it at the back.
Still does it, then pop off the base cover around the fan and heatsink and remove the dust and fur. Nobody takes manufacturers to task over it, so they see no need to improve the venting.

Send it back to HP for repair. As gerbil mentioned, it could be an overheating problem, but the random time to failure makes me doubt that. I suspect you have a solder/connection problem on the motherboard or in the power supply.

Thanks for all your solution. hope to same issues again!

I found two cases, perhaps, it can help you:
1. heat issue: check the active-heatsink/fan and try to change it with better one.
2. It's motherboard issue.

Can that happen if the cmos battery is dead

Call me i can fix your issue.

commented: Thats not a good idea since they do not know who you are! +0
commented: Stop soliciting here, help in forum if you can - otherwise bugger off... -3

This is due to overheating causing the processor under the cooling system fan to switch off. I came across this problem once and when I replaced the processor it work perfectly. (That for laptops only).
If a desktop PC then check the capacitors around the processor, One or two must be leaking. Just have it replaced with correct specs & there you go.Good as normal.

it could be the cpu then again i used artic silver on my PS3's CPU cooled it down very good and made my ps3 a whole lot better
then again it might be the capacitors but whats really worse is the psu overloading or your motherboard is about to get fried no offense

I had this on a laptop years ago, and the battery connector was loose.