This morning I saw some chatter about using WMI to get defrag information. Curious about the method I found this page on MSDN outlining the various methods on the Win32_Volume class:
Win32_Volume Methods
And, more specifically, I found this page for the Defrag method itself:
Defrag method of the Win32_Volume Class
When I looked at the arguments I only saw one parameter that took input: Force.
The Force parameter required a Boolean ($true or $false) to indicate whether defragmenting of the volume would occur even if free space is low. The default is false. To use this on a specific volume use this syntax:
0 comments:
Post a Comment