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)