Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Run "Rescan Disks" from command line

Posted on 2008-06-26
3
Medium Priority
?
3,456 Views
Last Modified: 2010-03-26
Is there a way to execute the service "Rescan Disks" from the command line.
The manual way to run it is right click my computer then Manage >> Storage. Right click on "Disk Management" and there is an option to "Rescan Disks" but I'd like to run it using an automated scheduled task.

I need this in order to automate the "hot swap" of our SBS Server's mobile rack hard drives that are used for daily backup. That is, when using SNT's ST-136SATA mobile rack, which is supposed to be hot swappable, there is an option to turn off the hard drive power and switch with another drive while the server is running. Unfortunately, when replacing the drive with another one the drive is removed from the drives list available in the Windows Explorer and in the "Disk Management". The only thing that makes windows to recognize the disk is "Rescan Disks" command.

If not, is there any other alternative to make windows recognize the hot swapped drive?


Thanks,
Tomer.
0
Comment
Question by:Tomer73
3 Comments
 
LVL 25

Expert Comment

by:slam69
ID: 21873813
chkdsk /r from teh command line whenin the relevant route directory of drive
0
 
LVL 70

Accepted Solution

by:
KCTS earned 500 total points
ID: 21873832
diskpart rescan
0
 

Expert Comment

by:laf17c0dx
ID: 25631576
Exact diskpart in this particular case is:
echo rescan>rescan.txt & diskpart /s rescan.txt
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Loops Section Overview

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question