ePropertyValue:@(
            $_.Files | ConvertTo-DefenderScannedFilePathStats
        )

        Add-DefenderCollectionType -CollectionRef:([ref]$result.Files)
    }

    if ($null -ne $_.Processes)
    {
        $result | Add-Member -NotePropertyName:'Processes' -NotePropertyValue:@(
            $_.Processes | ConvertTo-DefenderScannedProcessStats
        )

        Add-DefenderCollectionType -CollectionRef:([ref]$result.Processes)
    }

    $result
}

filter ConvertTo-DefenderScannedProcessStats
{
    $result = $_ | ConvertTo-DefenderScanStats

    $result.PSTypeNames.Insert(0, 'MpPerformanceReport.ScannedProcessStats')
    $result | Add-Member -NotePropertyName:'ProcessPath' -NotePropertyValue:($_.Process)

    if ($null -ne $_.Scans)
    {
        $result | Add-Member -NotePropertyName:'Scans' -NotePropertyValue:@(
            $_.Scans | ConvertTo-DefenderScanInfo
        )

        Add-DefenderCollectionType -CollectionRef:([ref]$result.Scans)
    }

    if ($null -ne $_.Files)
    {
        $result | Add-Member -NotePropertyName:'Files' -NotePropertyValue:@(
            $_.Files | ConvertTo-DefenderScannedFilePathStats
        )

        Add-DefenderCollectionType -CollectionRef:([ref]$result.Files)
    }

    if ($null -ne $_.Extensions)
    {
        $result | Add-Member -NotePropertyName:'Extensions' -NotePropertyValue:@(
            $_.Extensions | ConvertTo-DefenderScannedFileExtensionStats
        )

        Add-DefenderCollectionType -CollectionRef:([ref]$result.Extensions)
    }

    $result
}

<#
.SYNOPSIS
This cmdlet reports the file paths, file extensions, and processes that cause
the highest impact to Microsoft Defender Antivirus scans.

.DESCRIPTION
This cmdlet analyzes a previously collected Microsoft Defender Antivirus
performance recording and reports the file paths, file extensions and processes
that cause the highest impact to Microsoft Defender Antivirus scans.

The performance analyzer provides insight into problematic 