How to defrag drives with PowerShell in Windows Server 2012?
March 30, 2013 2 Comments
Besides repairing disks, defragmenting them is another common server maintenance task. Here is the guide lines for defragmenting drives using PowerShell.
- Open PowerShell window
- You may want to examine whether disks are fragmented or not, so execute Optimize-Volume D –Analyze –Verbose, where D is your drive letter
- You will see the result at the end of report. If necessary to defrag, then run Optimize-Volume D –Verbose
- Wanting to run this command on a remote computer, put –CimSession “Remote Computer Name”, without quotation marks, after the command
- At the end, for more information and help, run Get-Help Optimize-Volume, as I did in the above picture
Advertisements
I pay a quick visit day-to-day a few blogs and blogs to read posts, however this webpage gives feature based writing.
Nice,
Very good explanation and Works perfect.
Thanks for making the world better and I invite you to visit my webpage and maybe follow
http://www.itremotesolutions.com