Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for either freeware or the programming basics to power off/on a hard drive. Mounting and unmounting a hard drive is simple enough just using the command prompt in Windows XP. Now I need to be able to power down the hard drive so it will not become damaged when being unplugged. I would prefer this to be a simple doable in the command prompt, a simple script, or at worst C++/C#. Freeware that does this exact requirement would also do the job.

This script/program will run on Windows XP with .NET 2.0 SP1.

share|improve this question

migrated from Mar 4 '10 at 8:31

This question came from our site for professional and enthusiast programmers.

If the machine isn't designed for hot-swapping then it may not be safe to hot-swap the drive. – Douglas Leeder Mar 3 '10 at 16:17
First and foremost: this can only be done with hard-drive interfaces that support hot-swapping (like SATA). A "regular" PATA IDE hard-drive cannot and should not be hot-swapped - due to the way this hardware and related hardware (like the Motherboard's PATA IDE controller) initializes and works. – M.A. Hanin Mar 3 '10 at 16:22
Thank you for that. :) The hard drives are using SATA. – Brandon Mar 3 '10 at 16:26

M.A. Hanin is correct, once the drive is unmounted it's simply a case as to whether or not the drive, controller and power supply were designed to allow for removal.

share|improve this answer

I believe SATA 2 supports hot-swap natively. All you need is to buy a hot-swap kit. So a google search on "SATA 2 hot swap enclosure" will give you plenty of choice.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.