Gather information from LOG file

Hi,

I have a log file, which contains the below information:

ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ##################### Aggregation Status #########################
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Aggregation Start Time - 2016-07-03 22.30.00
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Aggregation End Time - 2016-07-03 23.30.57
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Total Duration took to drop index - 876
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Total Duration took to recreate index - 17468
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Total Number of tables aggregated - 292
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ####### Time taken for whole process - 3657330
ERROR 2016-07-03 23:30:57,338 schedulerFactory_Worker-9 com.efi.printsmith.franchisee.util.AggregationStatus - ##################################################################

I need to get only Aggregation Start Time - 2016-07-03 22.30.00, Aggregation End Time - 2016-07-03 23.30.57, Time taken for whole process - 3657330 to a text file.

-Kalyan

$log = Get-ChildItem \\path\to\logfile
$results = switch -Regex -File $log {
    'Aggregation (Start|End) .*' {$Matches[0]}
    'Time taken .*' {$Matches[0]}
}

$results | Out-File \\path\to\logresults.txt

Thanks.

-Kalyan