diff --git a/Diagnostics/ExchangeLogCollector/ExchangeLogCollector.ps1 b/Diagnostics/ExchangeLogCollector/ExchangeLogCollector.ps1 index 64d213330e..89097c38c2 100644 --- a/Diagnostics/ExchangeLogCollector/ExchangeLogCollector.ps1 +++ b/Diagnostics/ExchangeLogCollector/ExchangeLogCollector.ps1 @@ -8,6 +8,7 @@ param ( [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Alias('Fqdn')] [string[]]$Servers = @($env:COMPUTERNAME), + [switch]$AcceptedRemoteDomain, [switch]$ADDriverLogs, [bool]$AppSysLogs = $true, [bool]$AppSysLogsToXml = $true, @@ -56,6 +57,7 @@ param ( [switch]$TransportAgentLogs, [switch]$TransportConfig, [switch]$TransportRoutingTableLogs, + [switch]$TransportRules, [switch]$WindowsSecurityLogs, [switch]$AllPossibleLogs, [Alias("CollectAllLogsBasedOnDaysWorth")] diff --git a/Diagnostics/ExchangeLogCollector/Helpers/Get-ArgumentList.ps1 b/Diagnostics/ExchangeLogCollector/Helpers/Get-ArgumentList.ps1 index e5ecd88eb4..fc93bb7175 100644 --- a/Diagnostics/ExchangeLogCollector/Helpers/Get-ArgumentList.ps1 +++ b/Diagnostics/ExchangeLogCollector/Helpers/Get-ArgumentList.ps1 @@ -24,6 +24,7 @@ function Get-ArgumentList { } return [PSCustomObject]@{ + AcceptedRemoteDomain = $AcceptedRemoteDomain ADDriverLogs = $ADDriverLogs AnyTransportSwitchesEnabled = $Script:AnyTransportSwitchesEnabled AppSysLogs = $AppSysLogs @@ -79,6 +80,7 @@ function Get-ArgumentList { TransportAgentLogs = $TransportAgentLogs TransportConfig = $TransportConfig TransportRoutingTableLogs = $TransportRoutingTableLogs + TransportRules = $TransportRules WindowsSecurityLogs = $WindowsSecurityLogs } } diff --git a/Diagnostics/ExchangeLogCollector/Helpers/Test-PossibleCommonScenarios.ps1 b/Diagnostics/ExchangeLogCollector/Helpers/Test-PossibleCommonScenarios.ps1 index e8374ea014..13bdaf0285 100644 --- a/Diagnostics/ExchangeLogCollector/Helpers/Test-PossibleCommonScenarios.ps1 +++ b/Diagnostics/ExchangeLogCollector/Helpers/Test-PossibleCommonScenarios.ps1 @@ -51,6 +51,8 @@ function Test-PossibleCommonScenarios { $Script:FrontEndProtocolLogs = $true $Script:MailboxDeliveryThrottlingLogs = $true $Script:PipelineTracingLogs = $true + $Script:TransportRules = $true + $Script:AcceptedRemoteDomain = $true } if ($ConnectivityLogs) { @@ -87,6 +89,8 @@ function Test-PossibleCommonScenarios { $Script:MessageTrackingLogs = $true $Script:QueueInformation = $true $Script:TransportConfig = $true + $Script:TransportRules = $true + $Script:AcceptedRemoteDomain = $true } if ($OutlookConnectivityIssues) { @@ -123,7 +127,9 @@ function Test-PossibleCommonScenarios { $TransportAgentLogs -or $TransportRoutingTableLogs -or $DefaultTransportLogging -or - $PipelineTracingLogs) { + $PipelineTracingLogs -or + $TransportRules -or + $AcceptedRemoteDomain) { $Script:AnyTransportSwitchesEnabled = $true } diff --git a/Diagnostics/ExchangeLogCollector/Write/Write-DataOnlyOnceOnMasterServer.ps1 b/Diagnostics/ExchangeLogCollector/Write/Write-DataOnlyOnceOnMasterServer.ps1 index 121e1974a6..9fef524eae 100644 --- a/Diagnostics/ExchangeLogCollector/Write/Write-DataOnlyOnceOnMasterServer.ps1 +++ b/Diagnostics/ExchangeLogCollector/Write/Write-DataOnlyOnceOnMasterServer.ps1 @@ -41,6 +41,28 @@ function Write-DataOnlyOnceOnMasterServer { Save-DataInfoToFile -dataIn $data -SaveToLocation $target -AddServerName $false } + if ($TransportRules) { + $target = $RootCopyToDirectory + "\TransportRules" + $data = Get-TransportRule + + # If no rules found, we want to report that. + if ($null -ne $data) { + Save-DataInfoToFile -dataIn $data -SaveToLocation $target -AddServerName $false + } else { + Save-DataInfoToFile -dataIn "No Transport Rules Found" -SaveXMLFile $false -SaveToLocation $target -AddServerName $false + } + } + + if ($AcceptedRemoteDomain) { + $target = $RootCopyToDirectory + "\AcceptedDomain" + $data = Get-AcceptedDomain + Save-DataInfoToFile -dataIn $data -SaveToLocation $target -AddServerName $false + + $target = $RootCopyToDirectory + "\RemoteDomain" + $data = Get-RemoteDomain + Save-DataInfoToFile -dataIn $data -SaveToLocation $target -AddServerName $false + } + if ($Error.Count -ne 0) { Save-DataInfoToFile -DataIn $Error -SaveToLocation ("$RootCopyToDirectory\AllErrors") Save-DataInfoToFile -DataIn (Get-UnhandledErrors) -SaveToLocation ("$RootCopyToDirectory\UnhandledErrors") diff --git a/docs/Diagnostics/ExchangeLogCollector.md b/docs/Diagnostics/ExchangeLogCollector.md index 711b16b4f2..9422d86da7 100644 --- a/docs/Diagnostics/ExchangeLogCollector.md +++ b/docs/Diagnostics/ExchangeLogCollector.md @@ -64,6 +64,7 @@ Parameter | Description | ----------|-------------| FilePath | The Location of where you would like the data to be copied over to. This location **must** be the same and accessible on all servers if you use the Servers parameter. Default value: C:\MS_Logs_Collection | Servers | An array of servers that you would like to collect data from. +AcceptedRemoteDomain | Enable to collect `Get-AcceptedDomain` and `Get-RemoteDomain`. ADDriverLogs | Enable to collect AD Driver Logs. Location: `V15\Logging\ADDriver` AppSysLogs | Collects the Windows Event Application, System, and MSExchange Management Logs. Default value `$true` AppSysLogsToXml | Collects the Windows Event Application and System and saves them out to XML. The time range only is from the time the script run and the value set on `LogAge`. Default value: `$true` @@ -71,7 +72,7 @@ AutoDLogs | Enable to collect AutoDiscover Logs. Location: `V15\Logging\Autodisc CollectFailoverMetrics | Enable to run the `CollectOverMetrics.ps1` script against the DAG. Only able to be run on an Exchange tools box or an Exchange Server. DAGInformation | Enable to collect the DAG Information from all different DAGs that are in the list of servers. DailyPerformanceLogs | Enable to collect Daily Performance Logs. Default Location: `V15\Logging\Diagnostics\DailyPerformanceLogs` -DefaultTransportLogging | Enables the following switches and their logs to be collected. `FrontEndConnectivityLogs`, `FrontEndProtocolLogs`, `HubConnectivityLogs`, `MailboxConnectivityLogs`, `MailboxDeliveryThrottlingLogs`, `MessageTrackingLogs`, `PipelineTracingLogs`, `QueueInformation`, `ReceiveConnectors`, `SendConnectors`, and `TransportConfig` +DefaultTransportLogging | Enables the following switches and their logs to be collected. `AcceptedRemoteDomain`, `FrontEndConnectivityLogs`, `FrontEndProtocolLogs`, `HubConnectivityLogs`, `MailboxConnectivityLogs`, `MailboxDeliveryThrottlingLogs`, `MessageTrackingLogs`, `PipelineTracingLogs`, `QueueInformation`, `ReceiveConnectors`, `SendConnectors`, `TransportConfig`, `TransportRoutingTableLogs`, and `TransportRules` EASLogs | Enable to collect Exchange Active Sync Logging. Location: `V15\Logging\HttpProxy\Eas` ECPLogs | Enable to collect ECP Logs. Location: `V15\Logging\ECP` and `V15\Logging\HttpProxy\Ecp` EWSLogs | Enable to collect EWS Logs. Location: `V15\Logging\HttpProxy\Ews` and `V15\Logging\Ews` @@ -109,6 +110,7 @@ ServerInformation | Enable to collect general server information. TransportAgentLogs | Enable to collect the Agent Logs. Location: `(Get-TransportService $server).AgentLogPath`, `(Get-FrontendTransportService $server).AgentLogPath`, `(Get-MailboxTransportService $server).MailboxSubmissionAgentLogPath`, and `(Get-MailboxTransportService $server).MailboxDeliveryAgentLogPath` TransportConfig | Enable to collect the Transport Configuration files from the Server and `Get-TransportConfig` from the org. Files: `EdgeTransport.exe.config`, `MSExchangeFrontEndTransport.exe.config`, `MSExchangeDelivery.exe.config`, and `MSExchangeSubmission.exe.config` TransportRoutingTableLogs | Enable to collect the Routing Table Logs. Location: `(Get-TransportService $server).RoutingTableLogPath`, `(Get-FrontendTransportService $server).RoutingTableLogPath`, and `(Get-MailboxTransportService $server).RoutingTableLogPath` +TransportRules | Enable to collect `Get-TransportRule`. WindowsSecurityLogs | Enable to collect the Windows Security Logs. Default Location: `'C:\Windows\System32\WinEvt\Logs\Security.evtx'` AllPossibleLogs | Enables the collection of all default logging collection on the Server. CollectAllLogsBasedOnLogAge | Boolean to determine if you collect all the logs based off the log's age or all the logs in that directory. Default value `$true`