File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,18 @@ function Start-MessageTracking {
452
452
}
453
453
454
454
}
455
+
456
+ function Export-MessageData {
457
+ $SaveFileDialog = New-Object Microsoft.Win32.SaveFileDialog($null )
458
+ $SaveFileDialog.FileName = " TrackedMessage_{0}" -f [DateTime ]::Now.ToShortDateString()
459
+ $SaveFileDialog.DefaultExt = " .csv"
460
+ $SaveFileDialog.Filter = " Comma separated values (.csv)|*.csv"
461
+
462
+ if ($SaveFileDialog.ShowDialog ())
463
+ {
464
+ $FoundMailDataGrid.Items | ConvertTo-Csv - Delimiter " *" - NoTypeInformation | Out-File - FilePath $SaveFileDialog.FileName - Encoding UTF8 - Confirm:$false - Force
465
+ }
466
+ }
455
467
# endregion Functions
456
468
457
469
Add-Type - AssemblyName PresentationFramework
@@ -466,4 +478,5 @@ $EventIdTextBox.SelectedItem = $EventIdTextBox.ItemsSource | Select-Object -Firs
466
478
$Window.add_Loaded ({Get-ExchangeSnapin })
467
479
$GitHubLink.add_MouseLeftButtonDown ({Open-Url - Url $GitHubPage })
468
480
$SearchButton.add_Click ({Start-MessageTracking })
481
+ $ExportButton.add_Click ({Export-MessageData })
469
482
$Gui.ShowDialog () | Out-Null
You can’t perform that action at this time.
0 commit comments