Solved

Run "Rescan Disks" from command line

Posted on 2008-06-26
3
2,355 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 125 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now