ComplianceDiagnosticDLP.psm1
Import-Module "$PSScriptRoot\ComplianceDiagnosticUtils.psm1" function Confirm-DlpCommandsPresent { # Check if MIP Label Commands are present $command = Get-Command Get-DlpCompliancePolicy -ErrorAction SilentlyContinue if ($command -eq $null) { return $false } $command = Get-Command Get-DlpComplianceRule -ErrorAction SilentlyContinue if ($command -eq $null) { return $false } return $true } function Initialize-DlpExchange{ $global:dlpControlVariables.sampleEmailFileData = $null $global:dlpControlVariables.emtdFileData = $null $global:dlpControlVariables.fileData = $null $global:dlpControlVariables.PTFiddlerFile = $null $global:dlpControlVariables.PnrFile = $null } function Initialize-DlpSpo{ $global:dlpControlVariables.TDPReport = $null $global:dlpControlVariables.SPOGSDFiles = $null } function Initialize-DlpTeams{ $global:dlpControlVariables.teamsFileData = $null } function Initialize-DlpEndpoint{ $global:dlpControlVariables.ClassificationFiddlerFiles = $null $global:dlpControlVariables.BrowsedEndpointReproFiles = $null } function Initialize-DlpAlerts{ $global:dlpControlVariables.AlertFiddlerFile = $null $global:dlpControlVariables.ActivityFile = $null $global:dlpControlVariables.AuditFile = $null } function Get-DLPTabContent ($TabObject){ [Parameter(Mandatory=$true)] [Windows.Controls.TabItem] $TabObject GetGlobalDlpRule $dlpExchangeButton = Get-Button -ButtonName "DLP Exchange Diagnostic" $dlpSPOButton = Get-Button -ButtonName "DLP SPO/ODB Diagnostic" -Margin "10,50,10,10" $dlpTeamsButton = Get-Button -ButtonName "DLP Teams Diagnostic" -Margin "10,50,10,10" $dlpEndpointButton = Get-Button -ButtonName "DLP Endpoint Diagnostic" -Margin "10,50,10,10" $dlpPanelGrid = New-Object Windows.Controls.Grid $dlpTopTabControl = Get-TopTabControl $dlpPanelGrid.Children.Add($dlpTopTabControl.TopTabControl) > $null $global:ContextScopeVariables.dlpOutput = New-Object Windows.Controls.StackPanel $outputPanelTemplate = Get-TemplateGrid $outputPanelTemplate.Column1.Children.Add($dlpExchangeButton) > $null $dlpDiagnosticTabContent = New-Object Windows.Controls.StackPanel $dlpDiagnosticTabContent.HorizontalAlignment = [Windows.HorizontalAlignment]::Center $dlpDiagnosticTabContent.VerticalAlignment = [Windows.VerticalAlignment]::Top $dlpDiagnosticTabContent.Margin = New-Object Windows.Thickness 0, 70, 0, 0 $dlpDiagnosticTabContent.Children.Add($global:ContextScopeVariables.dlpOutput) > $null $scrollViewer = New-Object Windows.Controls.ScrollViewer $scrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $scrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $outputPanelTemplate.Column2.Children.Add($dlpDiagnosticTabContent) > $null $scrollViewer.Content = $outputPanelTemplate.Grid # $dlpTopTabControl.DiagnosticsTabItem.Content = $scrollViewer // TODO : revive it after logic is built # NOTE: The variables that we use in event functions will be null if they are passed as local scope $dlpExchangeButton.Add_Click({ }) $dlpSPOButton.Add_Click({ }) $dlpTeamsButton.Add_Click({ }) $dlpEndpointButton.Add_Click({ }) # Collect diagnostic data from user $global:dlpControlVariables.dlpSupportDataTabContent = New-Object Windows.Controls.StackPanel $global:dlpControlVariables.dlpSupportDataTabContent.HorizontalAlignment = [Windows.HorizontalAlignment]::Center $global:dlpControlVariables.SupportPanelTemplate = Get-TemplateGrid $dlpEXOSupportButton = Get-Button -ButtonName "Exchange DLP" -Margin '10,50,10,10' -width 200 -HorizontalAlignment "Left" $global:dlpControlVariables.SupportPanelTemplate.Column1.Children.Add($dlpEXOSupportButton) > $null $dlpSPOSupportButton = Get-Button -ButtonName "SPO/ODB DLP" -Margin '10,50,10,10' -width 200 -HorizontalAlignment "Left" $global:dlpControlVariables.SupportPanelTemplate.Column1.Children.Add($dlpSPOSupportButton) > $null $dlpTeamsSupportButton = Get-Button -ButtonName "Teams DLP" -Margin '10,50,10,10' -width 200 -HorizontalAlignment "Left" $global:dlpControlVariables.SupportPanelTemplate.Column1.Children.Add($dlpTeamsSupportButton) > $null $dlpEndpointSupportButton = Get-Button -ButtonName "Endpoint DLP" -Margin '10,50,10,10' -width 200 -HorizontalAlignment "Left" $global:dlpControlVariables.SupportPanelTemplate.Column1.Children.Add($dlpEndpointSupportButton) > $null $dlpAlertsSupportButton = Get-Button -ButtonName "Collect DLP Alerts Data" -Margin '10,50,10,10' -width 200 -HorizontalAlignment "Left" $global:dlpControlVariables.SupportPanelTemplate.Column1.Children.Add($dlpAlertsSupportButton) > $null $DiagscrollViewer = New-Object Windows.Controls.ScrollViewer $DiagscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $DiagscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $DiagscrollViewer.Content = $global:dlpControlVariables.SupportPanelTemplate.Grid $dlpTopTabControl.GatherSupportDataTabItem.Content = $DiagscrollViewer $global:dlpControlVariables.SupportPanelTemplate.Column2.Children.Add($global:dlpControlVariables.dlpSupportDataTabContent ) > $null $dlpEXOSupportButton.Add_Click({ Initialize-DlpExchange Get-DlpEXOSupportTemplate }) $dlpSPOSupportButton.Add_Click({ Initialize-DlpSpo Get-DlpSPOSupportTemplate }) $dlpTeamsSupportButton.Add_Click({ Initialize-DlpTeams Get-DlpTeamsSupportTemplate }) $dlpEndpointSupportButton.Add_Click({ Initialize-DlpEndpoint Get-DlpEndpointSupportTemplate }) $dlpAlertsSupportButton.Add_Click({ Initialize-DlpAlerts Get-DlpAlertsSupportTemplate }) $TabObject.Content = $dlpPanelGrid } function Get-DlpAlertsSupportTemplate(){ $blueColor = [System.Windows.Media.Color]::FromRgb(63, 119, 206) $redColor = [System.Windows.Media.Color]::FromRgb(200, 10, 10) $supportDataHeader = Show-Text -Text "DLP Alerts Support Data Template" -Color $blueColor -fontSize 20 $tableGrid = Get-Table -columns 4 -rows 10 $workloadLabel = Show-Text -Text "Workload" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 1 -Control $workloadLabel $workloads = @('Exchange', 'Sharepoint/Onedrive', 'Endpoint', 'Teams') $global:dlpControlVariables.WorkloadCombobox = Get-ComboBox -Margin "0,5,10,5" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.WorkloadCombobox.ItemsSource = $workloads Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 2 -Control $global:dlpControlVariables.WorkloadCombobox $global:dlpControlVariables.WorkloadCombobox.Add_SelectionChanged({ param ( $sender, $eventArgs ) Get-TooltipForAlertsId -sender $sender -eventArgs $eventArgs }) $global:dlpControlVariables.itemIdentifierLabel = Show-Text -Text "Item Identifier" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $global:dlpControlVariables.itemIdentifierLabel.ToolTip = Get-ToolTip -Text "Select the workload to see how to find the corresponding item identifier" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 1 -Control $global:dlpControlVariables.itemIdentifierLabel $global:dlpControlVariables.itemId = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 2 -Control $global:dlpControlVariables.itemId $dateTimeLabel = Show-Text -Text "Date & Time of issue (UTC)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 1 -Control $dateTimeLabel $dateTimeButton = Get-Button -ButtonName "Select date & Time" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 2 -Control $dateTimeButton $global:ContextScopeVariables["DlpAlertsDateTimeLabel"] = Show-Text -Text "UTC Date Time" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 3 -Control $global:ContextScopeVariables["DlpAlertsDateTimeLabel"] $dateTimeButton.Add_Click({ $global:ContextScopeVariables.DateTimeProp = "DlpAlertsDateTime" $global:ContextScopeVariables["DlpAlertsDateTime"] = "" Get-DateTimePickerDialog }) $ImpactedRule = Show-Text -Text "DLP Rule" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 1 -Control $ImpactedRule $global:dlpControlVariables.ImpactedRuleComboboxAlerts = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ImpactedRuleComboboxAlerts.ItemsSource = $global:ContextScopeVariables.dlpRules.Name Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 2 -Control $global:dlpControlVariables.ImpactedRuleComboboxAlerts $global:dlpControlVariables.AlertFiddlerLabel = Show-Text -Text "Fiddler or har file Trace" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $global:dlpControlVariables.AlertFiddlerLabel.ToolTip = Get-ToolTip -Text "Open the alert from DLP tab and click on View Details`nThen Record the network trace while loading the alert`nin fiddler or on a browser as a .har file" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 1 -Control $global:dlpControlVariables.AlertFiddlerLabel $FiddlerFileButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedFiddlerLabel" ` -GlobalFileListName "AlertFiddlerFile" ` -ButtonName "Attach Fiddler or har Trace" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 2 -Control $FiddlerFileButton $global:dlpControlVariables.BrowsedFiddlerLabel = Show-Text -Text "Attached Alert Network trace" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $AlertFiddlerScrollViewer = New-Object Windows.Controls.ScrollViewer $AlertFiddlerScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $AlertFiddlerScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $AlertFiddlerScrollViewer.Content = $global:dlpControlVariables.BrowsedFiddlerLabel Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 2 -Control $AlertFiddlerScrollViewer $global:dlpControlVariables.AuditRecordLabel = Show-Text -Text "Audit Record" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $global:dlpControlVariables.AuditRecordLabel.ToolTip = Get-ToolTip -Text "Search for audit record in Purview's Audit tab by selecting:`nAcitivities-Friendly Name: Matched DLP rule`nRecord Types: Select everything Starting with 'ComplianceDLP'`nUsers(Optional): Select the user to narrow the search`nKeyword Search(Optional): UniqueId of the email/file/message or path of the endpoint file" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 1 -Control $global:dlpControlVariables.AuditRecordLabel $AuditFileButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedAuditLabel" ` -GlobalFileListName "AuditFile" ` -ButtonName "Attach Audit Records" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 2 -Control $AuditFileButton $global:dlpControlVariables.BrowsedAuditLabel = Show-Text -Text "Attached Audit record" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $AuditScrollViewer = New-Object Windows.Controls.ScrollViewer $AuditScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $AuditScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $AuditScrollViewer.Content = $global:dlpControlVariables.BrowsedAuditLabel Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 2 -Control $AuditScrollViewer $global:dlpControlVariables.ActivityExplorerLabel = Show-Text -Text "Activity Explorer Trace" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $global:dlpControlVariables.ActivityExplorerLabel.ToolTip = Get-ToolTip -Text "Open activity explorer tab in DLP policies section`nAdd the filter 'Rule' and select the DLP Rule in the filter`nAdd filters to get the DLP Rule match in question`nStart recording the trace and click refresh button above the result table." Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 1 -Control $global:dlpControlVariables.ActivityExplorerLabel $AvtivityFileButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedActivityLabel" ` -GlobalFileListName "ActivityFile" ` -ButtonName "Attach Activity Explorer Trace" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 2 -Control $AvtivityFileButton $global:dlpControlVariables.BrowsedActivityLabel = Show-Text -Text "Attached Activity Explorer trace" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $ActivityScrollViewer = New-Object Windows.Controls.ScrollViewer $ActivityScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ActivityScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ActivityScrollViewer.Content = $global:dlpControlVariables.BrowsedActivityLabel Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 2 -Control $ActivityScrollViewer $tableGrid.Margin = New-Object System.Windows.Thickness(10,30,10,10) $tableGrid.HorizontalAlignment = "Center" $tableGrid.ColumnDefinitions[2].Width = 410 $global:dlpControlVariables.dlpSupportDataTabContent.Children.Clear() $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($supportDataHeader) > $null $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($tableGrid) > $null $GetDlpAlertsExport = Get-Button -ButtonName "Export Support Data" $GetDlpAlertsExport.Margin = New-Object System.Windows.Thickness(10,50,10,10) $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($GetDlpAlertsExport) > $null # $Disclaimer = Show-Text -Text "*Hover (move your mouse over) on the text boxes or Headers to see hints of how to get the data" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" -Color $redColor # $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($Disclaimer) > $null $GetDlpAlertsExport.Add_Click({ # Create a new SaveFileDialog object $Folder = Get-ExportFolder("ExportedDLPAlertsData") if (!$Folder) { return } $filePath = $Folder + "\"+"DLPAlertsExport.xmla" $supportData=@{} $supportData["ItemIdentifier"] = $global:dlpControlVariables.itemId.Text $supportData["Workload"] = $global:dlpControlVariables.WorkloadCombobox.Text $supportData["ImpactedRule"] = $global:dlpControlVariables.ImpactedRuleComboboxAlerts.Text $supportData["DlpRules"] = $global:ContextScopeVariables.dlpRules # $supportData["Forests"] = Get-ForestInfo $supportData["DateTime"] = $global:ContextScopeVariables["DlpAlertsDateTime"] try { # Copy the files to the destination folder $supportData["AlertFiddlerFile"] = Get-FileName($global:dlpControlVariables.AlertFiddlerFile) foreach ($file in $global:dlpControlVariables.AlertFiddlerFile) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["AuditFile"] = Get-FileName($global:dlpControlVariables.AuditFile) foreach ($file in $global:dlpControlVariables.AuditFile) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["ActivityFile"] = Get-FileName($global:dlpControlVariables.ActivityFile) foreach ($file in $global:dlpControlVariables.ActivityFile) { Copy-Item $file $Folder -Force } # Save the object as an XMLA file # $supportData | Export-Clixml -Path $filePath # Zip the destination folder CleanAndShowFolder -Folder $Folder -supportData $supportData -filePath $filePath } catch { [System.Windows.MessageBox]::Show("Failed to create zip file. Error message: $_", "Error", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) } }) } function Get-TooltipForAlertsId( $sender, $eventArgs){ $teamsMessage = "Open Microsoft Teams in edge browser`nOpen the corresponding message`nHit f12 and open Network`nNow like the message with emoticon`nCheck for a call 'messages/{messageId}/properties'`nCopy the Number between messages/ and /properties" $EndpointMessage = "Give the full file location path of the file. `nHold Shift and right-click on the file, select Copy Path." $spo = "Navigate to the document library on Browser `n Select the file `n Click on the ... dots `n Select 'Details' option `n A panel opens on the right `n Scroll to Bottom `n Click on copy icon beside path" $exchange = "Give the messageId in this format:`n<PH0PR00MB09993EA57251D44FD792BFD99@PH0PR00MB0999.namprd00.prod.outlook.com>" $selectedWorkload = $sender.SelectedItem switch ($selectedWorkload) { "Exchange" { $global:dlpControlVariables.itemIdentifierLabel.ToolTip = $exchange } "Sharepoint/Onedrive" { $global:dlpControlVariables.itemIdentifierLabel.ToolTip = $spo } "Endpoint" { $global:dlpControlVariables.itemIdentifierLabel.ToolTip = $EndpointMessage } "Teams" { $global:dlpControlVariables.itemIdentifierLabel.ToolTip = $teamsMessage } } } function Get-DlpTeamsSupportTemplate(){ $blueColor = [System.Windows.Media.Color]::FromRgb(63, 119, 206) $redColor = [System.Windows.Media.Color]::FromRgb(200, 10, 10) $supportDataHeader = Show-Text -Text "DLP Teams Support Data Template" -Color $blueColor -fontSize 20 $tableGrid = Get-Table -columns 4 -rows 10 $AffectedMessage = Show-Text -Text "Message Id" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $AffectedMessage.ToolTip = Get-ToolTip -Text "Open Microsoft Teams in edge browser`nOpen the corresponding message`nHit f12 and open Network`nNow like the message with emoticon`nCheck for a call 'messages/{messageId}/properties'`nCopy the Number between messages/ and /properties" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 1 -Control $AffectedMessage $global:dlpControlVariables.messageId = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 2 -Control $global:dlpControlVariables.messageId $scopedPolicyLabel = Show-Text -Text "Impacted Policy" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 1 -Control $scopedPolicyLabel $global:dlpControlVariables.scopedPolicyComboboxTeams = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.scopedPolicyComboboxTeams.ItemsSource = $global:ContextScopeVariables.dlpPolicyDropDown Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 2 -Control $global:dlpControlVariables.scopedPolicyComboboxTeams $global:dlpControlVariables.scopedPolicyComboboxTeams.add_SelectionChanged({ if ($global:dlpControlVariables.scopedPolicyComboboxTeams.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.ParentPolicyName -eq $global:dlpControlVariables.scopedPolicyComboboxTeams.SelectedItem} if ($selectedRule.GetType().Name -eq "PSObject") { $selectedRuleName = @( $selectedRule.Name ) } else { $selectedRuleName = $selectedRule.Name } $global:dlpControlVariables.ImpactedRuleComboboxTeams.ItemsSource = $selectedRuleName } }) $dateTimeLabel = Show-Text -Text "Date & Time of issue (UTC)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 1 -Control $dateTimeLabel $dateTimeButton = Get-Button -ButtonName "Select date & Time" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 2 -Control $dateTimeButton $global:ContextScopeVariables["DlpTeamsDateTimeLabel"] = Show-Text -Text "UTC Date Time" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 3 -Control $global:ContextScopeVariables["DlpTeamsDateTimeLabel"] $dateTimeButton.Add_Click({ $global:ContextScopeVariables.DateTimeProp = "DlpTeamsDateTime" $global:ContextScopeVariables["DlpTeamsDateTime"] = "" Get-DateTimePickerDialog }) $ImpactedRule = Show-Text -Text "Impacted Rule" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 1 -Control $ImpactedRule $global:dlpControlVariables.ImpactedRuleComboboxTeams = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ImpactedRuleComboboxTeams.ItemsSource = $global:ContextScopeVariables.dlpRuleDropDown #$global:dlpControlVariables.ImpactedLabelCombobox.SelectionMode = "Multiple" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 2 -Control $global:dlpControlVariables.ImpactedRuleComboboxTeams $global:dlpControlVariables.ImpactedRuleComboboxTeams.add_SelectionChanged({ if ($global:dlpControlVariables.ImpactedRuleComboboxTeams.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.Name -eq $global:dlpControlVariables.ImpactedRuleComboboxTeams.SelectedItem} $global:dlpControlVariables.scopedPolicyComboboxTeams.Text = $selectedRule.ParentPolicyName } }) $ChatTypeLabel = Show-Text -Text "Type of Chat" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 1 -Control $ChatTypeLabel $ChatType = @('1-1','Group Chat', 'Channel', 'Private Channel', 'Shared Channel') $global:dlpControlVariables.ChatTypeCombobox = Get-ComboBox -Margin "0,5,10,5" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ChatTypeCombobox.ItemsSource = $ChatType Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 2 -Control $global:dlpControlVariables.ChatTypeCombobox $AffectedMessageContent = Show-Text -Text "Message Content (Sample)" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 1 -Control $AffectedMessageContent $global:dlpControlVariables.message = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 2 -Control $global:dlpControlVariables.message $SenderSMTPLabel = Show-Text -Text "Sender SMTP address" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 1 -Control $SenderSMTPLabel $global:dlpControlVariables.senderSMTP = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 2 -Control $global:dlpControlVariables.senderSMTP $RecipientLabel = Show-Text -Text "Recipient Info (SMTP/Group Name/Channel)" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 1 -Control $RecipientLabel $global:dlpControlVariables.RecipentDetails = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 2 -Control $global:dlpControlVariables.RecipentDetails $BrowseAttachLabel = Show-Text -Text "Attach Screenshot/ Fiddler / Other info?" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 1 -Control $BrowseAttachLabel $BrowseAttachButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedTeamsFileLabel" ` -GlobalFileListName "teamsFileData" ` -ButtonName "Browse Supporting Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 2 -Control $BrowseAttachButton $global:dlpControlVariables.BrowsedTeamsFileLabel = Show-Text -Text "Attached Files" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $FilesScrollViewer = New-Object Windows.Controls.ScrollViewer $FilesScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.Content = $global:dlpControlVariables.BrowsedTeamsFileLabel Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 2 -Control $FilesScrollViewer $tableGrid.Margin = New-Object System.Windows.Thickness(10,30,10,10) $tableGrid.HorizontalAlignment = "Center" $tableGrid.ColumnDefinitions[2].Width = 410 $global:dlpControlVariables.dlpSupportDataTabContent.Children.Clear() $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($supportDataHeader) > $null $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($tableGrid) > $null $GetDlpTeamsExport = Get-Button -ButtonName "Export Support Data" $GetDlpTeamsExport.Margin = New-Object System.Windows.Thickness(10,50,10,10) $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($GetDlpTeamsExport) > $null $GetDlpTeamsExport.Add_Click({ # Create a new SaveFileDialog object $Folder = Get-ExportFolder("ExportedDLPTeamsData") if (!$Folder) { return } $filePath = $Folder + "\"+"DLPPolicyExport.xmla" $supportData=@{} $supportData["DlpPolicy"] = $global:ContextScopeVariables.dlpPolicy $supportData["DlpRule"] = $global:ContextScopeVariables.dlpRules $supportData["MessageId"] = $global:dlpControlVariables.messageId.Text $supportData["ImpactedRule"] = $global:dlpControlVariables.ImpactedRuleComboboxTeams.Text $supportData["ImpactedPolicy"] = $global:dlpControlVariables.scopedPolicyComboboxTeams.Text $supportData["ChatType"] = $global:dlpControlVariables.ChatTypeCombobox.Text $supportData["SampleMessage"] = $global:dlpControlVariables.message.Text $supportData["SenderSMTP"] = $global:dlpControlVariables.senderSMTP.Text $supportData["RecipentDetails"] = $global:dlpControlVariables.RecipentDetails.Text # $supportData["Forests"] = Get-ForestInfo $supportData["DateTime"] = $global:ContextScopeVariables["DlpTeamsDateTime"] try { # Copy the files to the destination folder $supportData["SupportingFiles"] = Get-FileName($global:dlpControlVariables.teamsFileData) foreach ($file in $global:dlpControlVariables.teamsFileData) { Copy-Item $file $Folder -Force } # Save the object as an XMLA file # $supportData | Export-Clixml -Path $filePath # Zip the destination folder CleanAndShowFolder -Folder $Folder -supportData $supportData -filePath $filePath } catch { [System.Windows.MessageBox]::Show("Failed to create zip file. Error message: $_", "Error", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) } }) } function Get-DlpEndpointSupportTemplate(){ $blueColor = [System.Windows.Media.Color]::FromRgb(63, 119, 206) $redColor = [System.Windows.Media.Color]::FromRgb(200, 10, 10) $supportDataHeader = Show-Text -Text "DLP Endpoint Support Data Template" -Color $blueColor -fontSize 20 $tableGrid = Get-Table -columns 4 -rows 13 $scopedPolicyLabel = Show-Text -Text "Impacted Policy" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 1 -Control $scopedPolicyLabel $global:dlpControlVariables.scopedPolicyComboboxEndpoint = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.scopedPolicyComboboxEndpoint.ItemsSource = $global:ContextScopeVariables.dlpPolicyDropDown Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 2 -Control $global:dlpControlVariables.scopedPolicyComboboxEndpoint $global:dlpControlVariables.scopedPolicyComboboxEndpoint.add_SelectionChanged({ if ($global:dlpControlVariables.scopedPolicyComboboxEndpoint.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.ParentPolicyName -eq $global:dlpControlVariables.scopedPolicyComboboxEndpoint.SelectedItem} if ($selectedRule.GetType().Name -eq "PSObject") { $selectedRuleName = @( $selectedRule.Name ) } else { $selectedRuleName = $selectedRule.Name } $global:dlpControlVariables.ImpactedRuleComboboxEndpoint.ItemsSource = $selectedRuleName } }) $ImpactedRule = Show-Text -Text "Impacted Rule" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 1 -Control $ImpactedRule $global:dlpControlVariables.ImpactedRuleComboboxEndpoint = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ImpactedRuleComboboxEndpoint.ItemsSource = $global:ContextScopeVariables.dlpRuleDropDown #$global:dlpControlVariables.ImpactedLabelCombobox.SelectionMode = "Multiple" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 2 -Control $global:dlpControlVariables.ImpactedRuleComboboxEndpoint $global:dlpControlVariables.ImpactedRuleComboboxEndpoint.add_SelectionChanged({ if ($global:dlpControlVariables.ImpactedRuleComboboxEndpoint.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.Name -eq $global:dlpControlVariables.ImpactedRuleComboboxEndpoint.SelectedItem} $global:dlpControlVariables.scopedPolicyComboboxEndpoint.Text = $selectedRule.ParentPolicyName } }) $dateTimeLabel = Show-Text -Text "Date & Time of issue (UTC)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 1 -Control $dateTimeLabel $dateTimeButton = Get-Button -ButtonName "Select date & Time" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 2 -Control $dateTimeButton $global:ContextScopeVariables["DlpEndpointDateTimeLabel"] = Show-Text -Text "UTC Date Time" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 3 -Control $global:ContextScopeVariables["DlpEndpointDateTimeLabel"] $dateTimeButton.Add_Click({ $global:ContextScopeVariables.DateTimeProp = "DlpEndpointDateTime" $global:ContextScopeVariables["DlpEndpointDateTime"] = "" Get-DateTimePickerDialog }) $clientAnalyzerInfo1 = Show-Text -Text "Please download and extract Client Analyzer from" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 2 -Control $clientAnalyzerInfo1 $clientAnalyzerInfo2 = Get-TextBox -Text "https://aka.ms/mdatpanalyzer" -IsReadOnly $true -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 3 -Control $clientAnalyzerInfo2 $clientAnalyzerAdditionalInfo1 = Show-Text -Text "Additional Arguments for Client Analyzer Tool" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 2 -Control $clientAnalyzerAdditionalInfo1 $global:dlpControlVariables.ClientAnalyzerParameters = Get-TextBox -Width 200 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 3 -Control $global:dlpControlVariables.ClientAnalyzerParameters $clientAnalyzerLocation = Show-Text -Text "Client Analyzer Location" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 1 -Control $clientAnalyzerLocation $BrowseClientAnalyzer = Get-Button -ButtonName "Browse Location" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 2 -Control $BrowseClientAnalyzer $BrowseClientAnalyzer.Add_Click({ $fileDialog = New-Object System.Windows.Forms.OpenFileDialog $fileDialog.Multiselect = $false $fileDialog.Filter = "MDEClientAnalyzer.cmd|MDEClientAnalyzer.cmd" $result = $fileDialog.ShowDialog() if ($result -eq [System.Windows.Forms.DialogResult]::OK) { $global:dlpControlVariables.clientAnalyzerFileName = $fileDialog.FileName $global:dlpControlVariables.BrowsedClientAnalyzerLabel.Text = $global:dlpControlVariables.clientAnalyzerFileName $global:dlpControlVariables.BrowsedClientAnalyzerLabel.Height = 30 } }) $RunClientAnalyzer = Get-Button -ButtonName "Run ClientAnalyzer" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 3 -Control $RunClientAnalyzer $RunClientAnalyzer.Add_Click({ $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) if ($currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) -eq $false) { [System.Windows.MessageBox]::Show("Please start compliance diagnostics tool in Admin mode to run client analyzer","Error",0,0) return } if ($global:dlpControlVariables.clientAnalyzerFileName -eq $null) { [System.Windows.MessageBox]::Show("Please select MDEClientAnalyzer executable from Browse Location tab.","Error",0,0) return } $arguments = "-t " + $global:dlpControlVariables.ClientAnalyzerParameters.Text Start-Process -filePath $global:dlpControlVariables.clientAnalyzerFileName -ArgumentList $arguments }) $global:dlpControlVariables.BrowsedClientAnalyzerLabel = Show-Text -Text "Client Analyzer Location" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $ClientAnalyzerViewer = New-Object Windows.Controls.ScrollViewer $ClientAnalyzerViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ClientAnalyzerViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ClientAnalyzerViewer.Content = $global:dlpControlVariables.BrowsedClientAnalyzerLabel Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 2 -Control $ClientAnalyzerViewer $BrowseClientAnalyzerOpLabel = Show-Text -Text "Attach ClientAnalyzer Output" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 1 -Control $BrowseClientAnalyzerOpLabel $BrowseClientAnalyzerOpButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedClientAnalyzerOpLabel" ` -GlobalFileListName "BrowsedClientAnalyzerOpFiles" ` -ButtonName "Browse ClientAnalyzer Output" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 2 -Control $BrowseClientAnalyzerOpButton $global:dlpControlVariables.BrowsedClientAnalyzerOpLabel = Show-Text -Text "Attached ClientAnalyzer Output" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $ClientAnalyzerOpViewer = New-Object Windows.Controls.ScrollViewer $ClientAnalyzerOpViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ClientAnalyzerOpViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ClientAnalyzerOpViewer.Content = $global:dlpControlVariables.BrowsedClientAnalyzerOpLabel Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 2 -Control $ClientAnalyzerOpViewer $BrowseReproLabel = Show-Text -Text "Sample Repro File" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 1 -Control $BrowseReproLabel $BrowseReproButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedEndpointReproLabel" ` -GlobalFileListName "BrowsedEndpointReproFiles" ` -ButtonName "Browse Repro Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 2 -Control $BrowseReproButton $global:dlpControlVariables.BrowsedEndpointReproLabel = Show-Text -Text "Attached Files" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $ReproFilesScrollViewer = New-Object Windows.Controls.ScrollViewer $ReproFilesScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ReproFilesScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $ReproFilesScrollViewer.Content = $global:dlpControlVariables.BrowsedEndpointReproLabel Add-ControlToTableAt -TableObj $tableGrid -row 10 -column 2 -Control $ReproFilesScrollViewer $BrowseAttachLabel = Show-Text -Text "Attach Screenshot/ Other info" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 11 -column 1 -Control $BrowseAttachLabel $BrowseAttachButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedEndpointFileLabel" ` -GlobalFileListName "endpointFileData" ` -ButtonName "Browse Supporting Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 11 -column 2 -Control $BrowseAttachButton $global:dlpControlVariables.BrowsedEndpointFileLabel = Show-Text -Text "Attached Files" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $FilesScrollViewer = New-Object Windows.Controls.ScrollViewer $FilesScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.Content = $global:dlpControlVariables.BrowsedEndpointFileLabel Add-ControlToTableAt -TableObj $tableGrid -row 12 -column 2 -Control $FilesScrollViewer $tableGrid.Margin = New-Object System.Windows.Thickness(10,30,10,10) $tableGrid.HorizontalAlignment = "Center" $tableGrid.ColumnDefinitions[2].Width = 410 $global:dlpControlVariables.dlpSupportDataTabContent.Children.Clear() $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($supportDataHeader) > $null $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($tableGrid) > $null $GetDlpEndpointExport = Get-Button -ButtonName "Export Support Data" $GetDlpEndpointExport.Margin = New-Object System.Windows.Thickness(10,50,10,10) $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($GetDlpEndpointExport) > $null $GetDlpEndpointExport.Add_Click({ # Create a new SaveFileDialog object $Folder = Get-ExportFolder("ExportedDLPEndpointData") if (!$Folder) { return } $filePath = $Folder + "\"+"DLPEndpointExport.xmla" $supportData=@{} $supportData["DlpPolicy"] = $global:ContextScopeVariables.dlpPolicy $supportData["DlpRule"] = $global:ContextScopeVariables.dlpRules $supportData["ImpactedRule"] = $global:dlpControlVariables.ImpactedRuleComboboxEndpoint.Text $supportData["ImpactedPolicy"] = $global:dlpControlVariables.scopedPolicyComboboxEndpoint.Text # $supportData["Forests"] = Get-ForestInfo $supportData["DateTime"] = $global:ContextScopeVariables["DlpEndpointDateTime"] try { # Copy the files to the destination folder $supportData["SupportingFiles"] = Get-FileName($global:dlpControlVariables.endpointFileData) foreach ($file in $global:dlpControlVariables.endpointFileData) { Copy-Item $file $Folder -Force } $supportData["ClientAnalyzerOpFiles"] = Get-FileName($global:dlpControlVariables.BrowsedClientAnalyzerOpFiles) foreach ($file in $global:dlpControlVariables.BrowsedClientAnalyzerOpFiles) { Copy-Item $file $Folder -Force } $supportData["EndpointReproFiles"] = Get-FileName($global:dlpControlVariables.BrowsedEndpointReproFiles) foreach ($file in $global:dlpControlVariables.BrowsedEndpointReproFiles) { Copy-Item $file $Folder -Force } # Save the object as an XMLA file # $supportData | Export-Clixml -Path $filePath # Zip the destination folder CleanAndShowFolder -Folder $Folder -supportData $supportData -filePath $filePath } catch { [System.Windows.MessageBox]::Show("Failed to create zip file. Error message: $_", "Error", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) } }) } function Get-DlpSPOSupportTemplate(){ $blueColor = [System.Windows.Media.Color]::FromRgb(63, 119, 206) $redColor = [System.Windows.Media.Color]::FromRgb(200, 10, 10) $supportDataHeader = Show-Text -Text "DLP Sharepoint/ODB Support Data Template" -Color $blueColor -fontSize 20 $tableGrid = Get-Table -columns 4 -rows 11 $AffectedDoc = Show-Text -Text "Affected File Path" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $AffectedDoc.ToolTip = Get-ToolTip -Text "Navigate to the document library on Browser `n Select the file `n Click on the ... dots `n Select 'Details' option `n A panel opens on the right `n Scroll to Bottom `n Click on copy icon beside path" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 1 -Control $AffectedDoc $global:dlpControlVariables.AffectedDocPath = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 2 -Control $global:dlpControlVariables.AffectedDocPath $global:dlpControlVariables.AffectedDocError = Show-Text -Text "Could not find the document. Please make sure that a valid path is provided." -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -Color $redColor $global:dlpControlVariables.AffectedDocError.Visibility = [Windows.Visibility]::Hidden Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 3 -Control $global:dlpControlVariables.AffectedDocError $scopedPolicyLabel = Show-Text -Text "Impacted Policy" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 1 -Control $scopedPolicyLabel $global:dlpControlVariables.scopedPolicyComboboxSPO = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.scopedPolicyComboboxSPO.ItemsSource = $global:ContextScopeVariables.dlpPolicyDropDown Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 2 -Control $global:dlpControlVariables.scopedPolicyComboboxSPO $global:dlpControlVariables.scopedPolicyComboboxSPO.add_SelectionChanged({ if ($global:dlpControlVariables.scopedPolicyComboboxSPO.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.ParentPolicyName -eq $global:dlpControlVariables.scopedPolicyComboboxSPO.SelectedItem} if ($selectedRule.GetType().Name -eq "PSObject") { $selectedRuleName = @( $selectedRule.Name ) } else { $selectedRuleName = $selectedRule.Name } $global:dlpControlVariables.ImpactedRuleComboboxSPO.ItemsSource = $selectedRuleName } }) $dateTimeLabel = Show-Text -Text "Date & Time of issue (UTC)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 1 -Control $dateTimeLabel $dateTimeButton = Get-Button -ButtonName "Select date & Time" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 2 -Control $dateTimeButton $global:ContextScopeVariables["DlpSPODateTimeLabel"] = Show-Text -Text "UTC Date Time" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 3 -Control $global:ContextScopeVariables["DlpSPODateTimeLabel"] $dateTimeButton.Add_Click({ $global:ContextScopeVariables.DateTimeProp = "DlpSPODateTime" $global:ContextScopeVariables["DlpSPODateTime"] = "" Get-DateTimePickerDialog }) $ImpactedRule = Show-Text -Text "Impacted Rule" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 1 -Control $ImpactedRule $global:dlpControlVariables.ImpactedRuleComboboxSPO = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ImpactedRuleComboboxSPO.ItemsSource = $global:ContextScopeVariables.dlpRuleDropDown #$global:dlpControlVariables.ImpactedLabelCombobox.SelectionMode = "Multiple" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 2 -Control $global:dlpControlVariables.ImpactedRuleComboboxSPO $global:dlpControlVariables.ImpactedRuleComboboxSPO.add_SelectionChanged({ if ($global:dlpControlVariables.ImpactedRuleComboboxSPO.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.Name -eq $global:dlpControlVariables.ImpactedRuleComboboxSPO.SelectedItem} $global:dlpControlVariables.scopedPolicyComboboxSPO.Text = $selectedRule.ParentPolicyName } }) $docSiteIdlabel = Show-Text -Text "Site ID (GUID) of document" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" -ShowHelp $true $docSiteIdlabel.ToolTip = Get-ToolTip -Text "Populate the Document Path field`nThen a link would be shown beside this text box`nUse that link to get the siteId`ncopy the GUID between<d:Id ...></d:Id>" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 1 -Control $docSiteIdlabel $global:dlpControlVariables.docSiteId = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 2 -Control $global:dlpControlVariables.docSiteId $global:dlpControlVariables.docSiteIdHelp = Show-Text -Text "Help" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 3 -Control $global:dlpControlVariables.docSiteIdHelp $global:dlpControlVariables.docSiteIdHelp.Visibility = [Windows.Visibility]::Hidden $reportSMTP = Show-Text -Text "Test-DlpPolicy Report Email address" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 1 -Control $reportSMTP $global:dlpControlVariables.reportSmtp = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 2 -Control $global:dlpControlVariables.reportSmtp $TestDlpPoliciesButton = Get-Button -ButtonName "Run Test-DlpPolicy" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 3 -Control $TestDlpPoliciesButton $global:dlpControlVariables.AffectedDocPath.Add_TextChanged({ $FileUrl = $global:dlpControlVariables.AffectedDocPath.Text -replace ":w:/r/", "" $siteUrl = $FileUrl -replace "(https?://.+?\.sharepoint\.com|https?://.+?\.sharepoint-df\.com|https?://(1drv|onedrive)\.live\.com)/([^/]+)/([^/]+)/([^/]+/)*[^/]+(\.\w+)?(\?[^#]*)?(#.*)?$", '$1/$3/$4' $apiLink = "$siteUrl/_api/site/id" if($siteUrl){ $global:dlpControlVariables.docSiteIdHelp.Text = "" $global:dlpControlVariables.docSiteIdHelp.Inlines.Clear() # Add regular text to the tooltip $global:dlpControlVariables.docSiteIdHelp.Inlines.Add("Click the following link to get the site id between <d:Id> tags `n") # Create a Hyperlink $hyperlink = New-Object Windows.Documents.Hyperlink $hyperlink.Inlines.Add("Click Here For SiteID") $hyperlink.NavigateUri = $apiLink $hyperlink.Add_RequestNavigate({ Start-Process $args.Uri.AbsoluteUri }) # Add the Hyperlink to the TextBlock $global:dlpControlVariables.docSiteIdHelp.Inlines.Add($hyperlink) $global:dlpControlVariables.docSiteIdHelp.Visibility = [Windows.Visibility]::Visible }else{ $global:dlpControlVariables.docSiteIdHelp.Visibility = [Windows.Visibility]::Hidden } }) $TestDlpPoliciesButton.Add_Click({ if ($global:dlpControlVariables.AffectedDocPath.Text -eq $null) { [System.Windows.MessageBox]::Show("Please enter the affected doc path in SPO/ODB.","Error",0,0) return } if ($global:dlpControlVariables.reportSmtp.Text -eq $null) { [System.Windows.MessageBox]::Show("Please enter the email the report has to be sent to.","Error",0,0) return } if ($global:dlpControlVariables.docSiteId.Text -eq $null) { [System.Windows.MessageBox]::Show("Please enter the Site ID (GUID) of the document.","Error",0,0) return } $global:dlpControlVariables.AffectedDocError.Visibility = [Windows.Visibility]::Hidden $v = $global:dlpControlVariables.AffectedDocPath.Text $FileUrl = $v -replace ":w:/r/", "" $siteUrl = $FileUrl -replace "(https?://.+?\.sharepoint\.com|https?://.+?\.sharepoint-df\.com|https?://(1drv|onedrive)\.live\.com)/([^/]+)/([^/]+)/([^/]+/)*[^/]+(\.\w+)?(\?[^#]*)?(#.*)?$", '$1/$3/$4' $siteId = $global:dlpControlVariables.docSiteId.Text $workload = "SPO" if($FileUrl -like "*-my.sharepoint*") { $workload = "ODB" } $pattern = "(?<=\%7B)(.*?)(?=\%7D)" $pattern1 = "(?<=\{)(.*?)(?=\})" if ($FileUrl -match $pattern) { $matchesR = [regex]::Matches($FileUrl, $pattern) $match = $matchesR[0].Value Write-Host "Id" -NoNewLine -ForegroundColor Blue; Write-Host " $match" -ForegroundColor Cyan $id = $match }elseif($FileUrl -match $pattern1){ $matchesR = [regex]::Matches($FileUrl, $pattern1) $match = $matchesR[0].Value Write-Host "Id" -NoNewLine -ForegroundColor Blue; Write-Host " $match" -ForegroundColor Cyan $id = $match } if(!$siteUrl){ $global:dlpControlVariables.AffectedDocError.Visibility = [Windows.Visibility]::Visible } else{ $scriptBlock = { param($siteId, $FileUrl, $workload, $reportAddr) $res = Test-DlpPolicies -SiteId $siteId -FileUrl $FileUrl -Workload $workload -SendReportTo $reportAddr return $res } $ps = [powershell]::Create().AddScript($scriptBlock) $ps.AddArgument($siteId) $ps.AddArgument($FileUrl) $ps.AddArgument($workload) $ps.AddArgument($global:dlpControlVariables.reportSmtp.Text) $global:dlpControlVariables.TDPResult = Get-ExoCmdletResult -ps $ps if($global:dlpControlVariables.TDPResult.Message.Contains("Unable to find the file")){ $global:dlpControlVariables.AffectedDocError.Visibility = [Windows.Visibility]::Visible }elseif($global:dlpControlVariables.TDPResult.Message.Contains("request is accepted")){ $global:dlpControlVariables.BrowsedTDPLabel.Text = "A Report has been sent to the above email address with subject 'Test-DlpPolicies on File'. `nPlease download it and attach here." } } }) $TDPLabel = Show-Text -Text "Attach Test-DlpPolicy Report" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 1 -Control $TDPLabel $TDPButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedTDPLabel" ` -GlobalFileListName "TDPReport" ` -ButtonName "Browse Test-DlpPolicy Report" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 2 -Control $TDPButton $global:dlpControlVariables.BrowsedTDPLabel = Show-Text -Text "Attached Test-DlpPolicies Report" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $TDPscrollViewer = New-Object Windows.Controls.ScrollViewer $TDPscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $TDPscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $TDPscrollViewer.Content = $global:dlpControlVariables.BrowsedTDPLabel Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 2 -Control $TDPscrollViewer $BrowseAttachLabel = Show-Text -Text "Attach Screenshot/ Fiddler / Other info?" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 1 -Control $BrowseAttachLabel $BrowseAttachButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedSPOFileLabel" ` -GlobalFileListName "SPOGSDFiles" ` -ButtonName "Browse Supporting Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 2 -Control $BrowseAttachButton $global:dlpControlVariables.BrowsedSPOFileLabel = Show-Text -Text "Attached Files" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $FilesScrollViewer = New-Object Windows.Controls.ScrollViewer $FilesScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.Content = $global:dlpControlVariables.BrowsedSPOFileLabel Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 2 -Control $FilesScrollViewer $AdditionalDoc = Show-Text -Text "Additional file paths" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 10 -column 1 -Control $AdditionalDoc $global:dlpControlVariables.AdditionalPaths = Get-TextBox -Width 400 -height 150 -Margin "0,0,10,0" -HorizontalAlignment "Left" $global:dlpControlVariables.AdditionalPaths.AcceptsReturn = $true $global:dlpControlVariables.AdditionalPaths.TextWrapping = "Wrap" Add-ControlToTableAt -TableObj $tableGrid -row 10 -column 2 -Control $global:dlpControlVariables.AdditionalPaths $tableGrid.Margin = New-Object System.Windows.Thickness(10,30,10,10) $tableGrid.HorizontalAlignment = "Center" $tableGrid.ColumnDefinitions[2].Width = 410 $global:dlpControlVariables.dlpSupportDataTabContent.Children.Clear() $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($supportDataHeader) > $null $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($tableGrid) > $null $GetDlpSPOExport = Get-Button -ButtonName "Export Support Data" $GetDlpSPOExport.Margin = New-Object System.Windows.Thickness(10,50,10,10) $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($GetDlpSPOExport) > $null $GetDlpSPOExport.Add_Click({ # Create a new SaveFileDialog object $Folder = Get-ExportFolder("ExportedDLPSPOData") if (!$Folder) { return } $filePath = $Folder + "\"+"DLPPolicyExport.xmla" $supportData=@{} $supportData["DlpPolicy"] = $global:ContextScopeVariables.dlpPolicy $supportData["DlpRule"] = $global:ContextScopeVariables.dlpRules $supportData["FilePath"] = $global:dlpControlVariables.AffectedDocPath.Text $supportData["ImpactedRule"] = $global:dlpControlVariables.ImpactedRuleComboboxSPO.Text $supportData["ImpactedPolicy"] = $global:dlpControlVariables.scopedPolicyComboboxSPO.Text $supportData["AdditionalFilePaths"] = $global:dlpControlVariables.AdditionalPaths.Text $supportData["ComplianceProperties"] = $global:dlpControlVariables.TDPResult # $supportData["Forests"] = Get-ForestInfo $supportData["DateTime"] = $global:ContextScopeVariables["DlpSPODateTime"] try { # Copy the files to the destination folder $supportData["TestDlpPoliciesReportFiles"] = Get-FileName($global:dlpControlVariables.TDPReport) foreach ($file in $global:dlpControlVariables.TDPReport) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["SupportingFiles"] = Get-FileName($global:dlpControlVariables.SPOGSDFiles) foreach ($file in $global:dlpControlVariables.SPOGSDFiles) { Copy-Item $file $Folder -Force } # Save the object as an XMLA file # $supportData | Export-Clixml -Path $filePath # Zip the destination folder CleanAndShowFolder -Folder $Folder -supportData $supportData -filePath $filePath } catch { [System.Windows.MessageBox]::Show("Failed to create zip file. Error message: $_", "Error", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) } }) } function Get-DlpEXOSupportTemplate(){ $blueColor = [System.Windows.Media.Color]::FromRgb(63, 119, 206) $supportDataHeader = Show-Text -Text "DLP Exchange Support Data Template" -Color $blueColor -fontSize 20 $tableGrid = Get-Table -columns 4 -rows 16 $AffectedClient = Show-Text -Text "Affected Client" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 1 -Control $AffectedClient $AffectedClientCombo = @('Outlook For Web','Outlook Windows application', "Outlook Mobile") $global:dlpControlVariables.AffectedClientComboboxExo = Get-ComboBox -Margin "0,5,10,5" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.AffectedClientComboboxExo.ItemsSource = $AffectedClientCombo Add-ControlToTableAt -TableObj $tableGrid -row 0 -column 2 -Control $global:dlpControlVariables.AffectedClientComboboxExo $ImpactedUserSMTP = Show-Text -Text "Impacted User/Group SMTP" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 1 -Control $ImpactedUserSMTP $global:dlpControlVariables.ImpactedUserTextBoxExo = Get-TextBox -Width 400 -Margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 1 -column 2 -Control $global:dlpControlVariables.ImpactedUserTextBoxExo $dateTimeLabel = Show-Text -Text "Date & Time of issue (UTC)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 1 -Control $dateTimeLabel $dateTimeButton = Get-Button -ButtonName "Select date & Time" -Margin "0,0,10,0" -HorizontalAlignment "Left" -height 30 -width 220 Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 2 -Control $dateTimeButton $global:ContextScopeVariables["DlpExoDateTimeLabel"] = Show-Text -Text "UTC Date Time" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 2 -column 3 -Control $global:ContextScopeVariables["DlpExoDateTimeLabel"] $dateTimeButton.Add_Click({ $global:ContextScopeVariables.DateTimeProp = "DlpExoDateTime" $global:ContextScopeVariables["DlpExoDateTime"] = "" Get-DateTimePickerDialog }) $scopedPolicyLabel = Show-Text -Text "Impacted Policy" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 1 -Control $scopedPolicyLabel $global:dlpControlVariables.scopedPolicyComboboxExo = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.scopedPolicyComboboxExo.ItemsSource = $global:ContextScopeVariables.dlpPolicyDropDown Add-ControlToTableAt -TableObj $tableGrid -row 3 -column 2 -Control $global:dlpControlVariables.scopedPolicyComboboxExo $global:dlpControlVariables.scopedPolicyComboboxExo.add_SelectionChanged({ if ($global:dlpControlVariables.scopedPolicyComboboxExo.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.ParentPolicyName -eq $global:dlpControlVariables.scopedPolicyComboboxExo.SelectedItem} if ($selectedRule.GetType().Name -eq "PSObject") { $selectedRuleName = @( $selectedRule.Name ) } else { $selectedRuleName = $selectedRule.Name } $global:dlpControlVariables.ImpactedRuleComboboxExo.ItemsSource = $selectedRuleName } }) $ImpactedRule = Show-Text -Text "Impacted Rule" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 1 -Control $ImpactedRule $global:dlpControlVariables.ImpactedRuleComboboxExo = Get-ComboBox -Margin "0,0,10,0" -Width 400 -HorizontalAlignment "Left" $global:dlpControlVariables.ImpactedRuleComboboxExo.ItemsSource = $global:ContextScopeVariables.dlpRuleDropDown #$global:dlpControlVariables.ImpactedLabelCombobox.SelectionMode = "Multiple" Add-ControlToTableAt -TableObj $tableGrid -row 4 -column 2 -Control $global:dlpControlVariables.ImpactedRuleComboboxExo $global:dlpControlVariables.ImpactedRuleComboboxExo.add_SelectionChanged({ if ($global:dlpControlVariables.ImpactedRuleComboboxExo.SelectedItem -ne $null){ $selectedRule = $global:ContextScopeVariables.dlpRules|?{$_.Name -eq $global:dlpControlVariables.ImpactedRuleComboboxExo.SelectedItem} $global:dlpControlVariables.scopedPolicyComboboxExo.Text = $selectedRule.ParentPolicyName } }) $SampleEmailLabel = Show-Text -Text "Sample Email file (.eml)" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 1 -Control $SampleEmailLabel $SampleEmailButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedEmailLabel" ` -GlobalFileListName "sampleEmailFileData" ` -ButtonName "Browse Sample Email" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 5 -column 2 -Control $SampleEmailButton $global:dlpControlVariables.BrowsedEmailLabel = Show-Text -Text "Attached Sample Email" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $SampleEmailscrollViewer = New-Object Windows.Controls.ScrollViewer $SampleEmailscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $SampleEmailscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $SampleEmailscrollViewer.Content = $global:dlpControlVariables.BrowsedEmailLabel Add-ControlToTableAt -TableObj $tableGrid -row 6 -column 2 -Control $SampleEmailscrollViewer $global:dlpControlVariables.EMTDLabel = Show-Text -Text "Extended Message Trace Detail" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" -ShowHelp $true $global:dlpControlVariables.EMTDLabel.ToolTip = Get-ToolTip -Text "Follow instructions from below page`nhttps://learn.microsoft.com/en-us/exchange/monitoring/trace-an-email-message/message-trace-modern-eac#open-message-trace" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 1 -Control $global:dlpControlVariables.EMTDLabel $EMTDButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedEMTDLabel" ` -GlobalFileListName "emtdFileData" ` -ButtonName "Browse EMTD" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 7 -column 2 -Control $EMTDButton $global:dlpControlVariables.BrowsedEMTDLabel = Show-Text -Text "Attached EMTD" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $EMTDscrollViewer = New-Object Windows.Controls.ScrollViewer $EMTDscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $EMTDscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $EMTDscrollViewer.Content = $global:dlpControlVariables.BrowsedEMTDLabel Add-ControlToTableAt -TableObj $tableGrid -row 8 -column 2 -Control $EMTDscrollViewer $BrowseAttachLabel = Show-Text -Text "Attach Screenshot/ Fiddler / Other info?" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 1 -Control $BrowseAttachLabel $BrowseAttachButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedFileLabel" ` -GlobalFileListName "fileData" ` -ButtonName "Browse Supporting Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" Add-ControlToTableAt -TableObj $tableGrid -row 9 -column 2 -Control $BrowseAttachButton $global:dlpControlVariables.BrowsedFileLabel = Show-Text -Text "Attached Files" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $FilesScrollViewer = New-Object Windows.Controls.ScrollViewer $FilesScrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $FilesScrollViewer.Content = $global:dlpControlVariables.BrowsedFileLabel Add-ControlToTableAt -TableObj $tableGrid -row 10 -column 2 -Control $FilesScrollViewer #$dlpSupportDataTabContent.Children.Add($global:dlpControlVariables.BrowsedFileLabel) $isPTLabel = Show-Text -Text "Is Policytip issue?" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 11 -column 1 -Control $isPTLabel $global:dlpControlVariables.scopedPolicyTipYes = Get-RadioButton -value "Yes" -selected $false $global:dlpControlVariables.scopedPolicyTipNo = Get-RadioButton -value "No" -selected $true $global:dlpControlVariables.scopedPolicyTipYes.Add_Checked({ RadioButton_Yes($_) }) $global:dlpControlVariables.scopedPolicyTipNo.Add_Checked({ RadioButton_No($_) }) $RBstackPanel = New-Object Windows.Controls.StackPanel $RBstackPanel.HorizontalAlignment = 'Left' $RBstackPanel.Children.Add($global:dlpControlVariables.scopedPolicyTipYes) $RBstackPanel.Children.Add($global:dlpControlVariables.scopedPolicyTipNo) Add-ControlToTableAt -TableObj $tableGrid -row 11 -column 2 -Control $RBstackPanel $global:dlpControlVariables.PTFiddler = Show-Text -Text "Fiddler/har File" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" $global:dlpControlVariables.PTFiddler.Visibility = [Windows.Visibility]::Hidden Add-ControlToTableAt -TableObj $tableGrid -row 12 -column 1 -Control $global:dlpControlVariables.PTFiddler $global:dlpControlVariables.PTFiddlerButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedFiddlerLabel" ` -GlobalFileListName "PTFiddlerFile" ` -ButtonName "Browse Supporting Files" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" $global:dlpControlVariables.PTFiddlerButton.Visibility = [Windows.Visibility]::Hidden Add-ControlToTableAt -TableObj $tableGrid -row 12 -column 2 -Control $global:dlpControlVariables.PTFiddlerButton $global:dlpControlVariables.ptFiddlerHelp = Show-Text -Text "Record while drafting or opening a draft email" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 12 -column 3 -Control $global:dlpControlVariables.ptFiddlerHelp $global:dlpControlVariables.ptFiddlerHelp.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.BrowsedFiddlerLabel = Show-Text -Text "Attached Policy Tips Fiddler/har" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $global:dlpControlVariables.BrowsedFiddlerLabel.Visibility = [Windows.Visibility]::Hidden $fiddscrollViewer = New-Object Windows.Controls.ScrollViewer $fiddscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $fiddscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $fiddscrollViewer.Content = $global:dlpControlVariables.BrowsedFiddlerLabel Add-ControlToTableAt -TableObj $tableGrid -row 13 -column 2 -Control $fiddscrollViewer $global:dlpControlVariables.PTPNR = Show-Text -Text "PNR File (If Outlook Desktop Issue)" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" $global:dlpControlVariables.PTPNR.Visibility = [Windows.Visibility]::Hidden Add-ControlToTableAt -TableObj $tableGrid -row 14 -column 1 -Control $global:dlpControlVariables.PTPNR $global:dlpControlVariables.PNRButton = Get-FileButton ` -GlobalScopeName "dlpControlVariables" ` -GlobalVariableName "BrowsedPNRLabel" ` -GlobalFileListName "PnrFile" ` -ButtonName "Browse PNR XML" ` -Margin "0,0,10,0" ` -HorizontalAlignment "Left" ` -height 30 ` -width 220 ` -VerticalAlignment "Center" $global:dlpControlVariables.PNRButton.Visibility = [Windows.Visibility]::Hidden Add-ControlToTableAt -TableObj $tableGrid -row 14 -column 2 -Control $global:dlpControlVariables.PNRButton $global:dlpControlVariables.pnrHelp = Show-Text -Text "location: C:\Users<username>\AppData\Local\Microsoft\Outlook" -IsBold $false -margin "0,0,10,0" -VerticalAlignment "Center" -HorizontalAlignment "Left" Add-ControlToTableAt -TableObj $tableGrid -row 14 -column 3 -Control $global:dlpControlVariables.pnrHelp $global:dlpControlVariables.pnrHelp.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.BrowsedPNRLabel = Show-Text -Text "Attached Policy Tips PNR File" -IsBold $false -margin "0,0,10,0" -HorizontalAlignment "Left" $global:dlpControlVariables.BrowsedPNRLabel.Visibility = [Windows.Visibility]::Hidden $PNRdscrollViewer = New-Object Windows.Controls.ScrollViewer $PNRdscrollViewer.VerticalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $PNRdscrollViewer.HorizontalScrollBarVisibility = [Windows.Controls.ScrollBarVisibility]::Auto $PNRdscrollViewer.Content = $global:dlpControlVariables.BrowsedPNRLabel Add-ControlToTableAt -TableObj $tableGrid -row 15 -column 2 -Control $PNRdscrollViewer $tableGrid.Margin = New-Object System.Windows.Thickness(10,30,10,10) $tableGrid.HorizontalAlignment = "Center" $tableGrid.ColumnDefinitions[2].Width = 410 $global:dlpControlVariables.dlpSupportDataTabContent.Children.Clear() $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($supportDataHeader) > $null $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($tableGrid) > $null $GetDlpExoExport = Get-Button -ButtonName "Export Support Data" $GetDlpExoExport.Margin = New-Object System.Windows.Thickness(10,50,10,10) $global:dlpControlVariables.dlpSupportDataTabContent.Children.Add($GetDlpExoExport) > $null $GetDlpExoExport.Add_Click({ # Create a new SaveFileDialog object $Folder = Get-ExportFolder("ExportedDLPEXOData") if (!$Folder) { return } $filePath = $Folder + "\"+"DLPPolicyExport.xmla" $supportData=@{} $supportData["DlpPolicy"] = $global:ContextScopeVariables.dlpPolicy $supportData["DlpRule"] = $global:ContextScopeVariables.dlpRules $supportData["ImpactedClient"] = $global:dlpControlVariables.AffectedClientComboboxExo.Text $supportData["ImpactedUser"] = $global:dlpControlVariables.ImpactedUserTextBoxExo.Text $supportData["ImpactedRule"] = $global:dlpControlVariables.ImpactedRuleComboboxExo.Text $supportData["ImpactedPolicy"] = $global:dlpControlVariables.scopedPolicyComboboxExo.Text $supportData["IsPolicyTipIssue"] = $global:dlpControlVariables.scopedPolicyTipYes.IsChecked # $supportData["Forests"] = Get-ForestInfo $supportData["DateTime"] = $global:ContextScopeVariables["DlpExoDateTime"] try { # Copy the files to the destination folder $supportData["ReproFile"] = Get-FileName($global:dlpControlVariables.sampleEmailFileData) foreach ($file in $global:dlpControlVariables.sampleEmailFileData) { Copy-Item $file $Folder -Force } # Copy the files to the destination $supportData["ExtendedMessageTraceFiles"] = Get-FileName($global:dlpControlVariables.emtdFileData) foreach ($file in $global:dlpControlVariables.emtdFileData) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["SupportingFiles"] = Get-FileName($global:dlpControlVariables.fileData) foreach ($file in $global:dlpControlVariables.fileData) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["PolicyTipSupportFiles"] = Get-FileName($global:dlpControlVariables.PTFiddlerFile) foreach ($file in $global:dlpControlVariables.PTFiddlerFile) { Copy-Item $file $Folder -Force } # Copy the files to the destination folder $supportData["PolicyTipPnrFiles"] = Get-FileName($global:dlpControlVariables.PnrFile) foreach ($file in $global:dlpControlVariables.PnrFile) { Copy-Item $file $Folder -Force } # Save the object as an XMLA file # $supportData | Export-Clixml -Path $filePath # Zip the destination folder CleanAndShowFolder -Folder $Folder -supportData $supportData -filePath $filePath } catch { [System.Windows.MessageBox]::Show("Failed to create zip file. Error message: $_", "Error", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) } }) } function RadioButton_Yes($s) { $global:dlpControlVariables.PTFiddler.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.PTFiddlerButton.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.ptFiddlerHelp.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.BrowsedFiddlerLabel.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.PTPNR.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.PNRButton.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.pnrHelp.Visibility = [Windows.Visibility]::Visible $global:dlpControlVariables.BrowsedPNRLabel.Visibility = [Windows.Visibility]::Visible } function RadioButton_No($s) { $global:dlpControlVariables.PTFiddler.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.PTFiddlerButton.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.ptFiddlerHelp.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.BrowsedFiddlerLabel.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.PTPNR.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.PNRButton.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.pnrHelp.Visibility = [Windows.Visibility]::Hidden $global:dlpControlVariables.BrowsedPNRLabel.Visibility = [Windows.Visibility]::Hidden } function GetGlobalDlpRule { [System.Windows.Input.Mouse]::SetCursor([System.Windows.Input.Cursors]::Wait) if($global:ContextScopeVariables.dlpRules -and $global:ContextScopeVariables.dlpPolicy){ return } Write-Host "Getting data loss prevention (DLP) policies in your organization." $global:ContextScopeVariables.dlpPolicy = Get-DlpCompliancePolicy if ($global:ContextScopeVariables.dlpPolicy -ne $null) { if ($global:ContextScopeVariables.dlpPolicy.GetType().Name -eq "PSObject") { $global:ContextScopeVariables.dlpPolicyDropDown = @( $global:ContextScopeVariables.dlpPolicy.Name ) } else { $global:ContextScopeVariables.dlpPolicyDropDown = $global:ContextScopeVariables.dlpPolicy.Name } } Write-Host "Getting data loss prevention (DLP) rules in your organization." $global:ContextScopeVariables.dlpRules = Get-DlpComplianceRule if ($global:ContextScopeVariables.dlpRules -ne $null) { if ($global:ContextScopeVariables.dlpRules.GetType().Name -eq "PSObject") { $global:ContextScopeVariables.dlpRuleDropDown = @( $global:ContextScopeVariables.dlpRules.Name ) } else { $global:ContextScopeVariables.dlpRuleDropDown = $global:ContextScopeVariables.dlpRules.Name } } [System.Windows.Input.Mouse]::SetCursor([System.Windows.Input.Cursors]::Arrow) } Export-ModuleMember -Function * # SIG # Begin signature block # MIIoOg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