We need to know more about your system. Is the undetected HDD the primary drive or the secondary drive? Either way, using command prompt will not fix the problem. If the HDD is being detected, typically it is a connection problem. Please tell us more about your problem. Start with listing the details about your system, and answer the following questions:
1. Is this a custom built system?
2. Who built it (if not a custom built system, tell us the manufaturer name)
3. If this is a custom built system, list all parts with their model numbers
4. What happens after you turn on the system?
You can also try these steps to help you.
1. Ensure you've connected the power and data cables, properly and securely.
2. If you're using a SATA HDD, try connecting the HDD to a different SATA port on the motherboard.
3. Try using a different SATA cable.
4. Try using a different power connector.
5. Use a digital multimeter to test that the Power Supply Unit is good (within acceptable tolerances)
If the bios is not detecting the drive then nothing else will "see" it either
Power the pc off and disconnect it from power, Disconnect the drive, Clear the cmos (see your owners manual), re-connect the drive, now reconnect the power cord and boot up and see if the drive is now being detected. Don't forget to go into the bios and reset at least your date and time.
Turn off the computer and and open it up and make sure the HDD power and SATA cable are all firmly in place. If that doesn't work I would go into the BIOS and make sure the HDD is enabled. Also in the BIOS look to see if there is a section called SATA options. If there is make sure the HDD is set to IDE mode not ACHI mode.