If your laptop remains powered as long as it is connected to the power adapter and shuts off as soon as (or shortly after) it is disconnected, the battery might need to be replaced. Check out this awesome page for troubleshooting and replacement information: HP G62-223CL Troubleshooting