SCOM 2007 R2 added a fragmentation analsysis health check that is producing warnings on many of my servers. To try to understand how SCOM is determines the fragmentation level, I created the following Powershell script that reproduces the same data:

$vols = Get-WmiObject -computername "Z002" Win32_Volume -filter "DriveType=3"
$defragInfo = $vols | %{$_.DefragAnalysis() | add-member -membertype noteproperty vname $ -passThru}
$defragInfo | %{$_.DefragAnalysis | add-member -membertype noteproperty DefragRecommended $_.DefragRecommended -passThru | add-member -membertype noteproperty vname $_.vname -passThru} | out-file ./tmp.txt

Sample output below. SCOM uses the FilePercentFragmentation number to warn on anything over 10%, what I'm wondering is how is the percentage calculated since it certainly isn't fragmented files divided by total files.

DefragRecommended : True

vname : I:\

AverageFileSize : 20277223990

AverageFragmentsPerFile : 1.11

ClusterSize : 4096

ExcessFolderFragments : 0

FilePercentFragmentation : 54

FragmentedFolders : 1

FreeSpace : 131237363712

FreeSpacePercent : 24

FreeSpacePercentFragmentation : 0

MFTPercentInUse : 10

MFTRecordCount : 65

PageFileSize : 0

TotalExcessFragments : 4

TotalFiles : 35

TotalFolders : 14

TotalFragmentedFiles : 2

TotalMFTFragments : 2

TotalMFTSize : 606208

TotalPageFileFragments : 0

TotalPercentFragmentation : 27

UsedSpace : 405626204160

VolumeName :

VolumeSize : 53686356787

  • By the way, I like your Powershell script. I'm going to pinch it. – user3914 Oct 14 '09 at 11:18
up vote 1 down vote accepted

I'm making an educated guess here, but I think it has to do with average fragmented file size (e.g. how many files are fragmented vs not), and their size as a percentage of total files.

For example, on one of my production servers, I have 0% fragmentation for all files bar one, which happens to be the database MDF file. The 60GB file is in two fragments, but the total fragmentation report states 73%.

Hope that makes sense.

  • I think that's a good guess and a likely explaination -- thanks – Chad Miller Oct 14 '09 at 12:01

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.