microsoft / microsoft/CSS-Exchange

[Issue] ExchangeLogCollector fails to collect Daily Performance Logs if the location was changed

Open
#2,023 0 comments 0 reactions 1 assignee View on GitHub

@dpaulson45 is already working on this.

Since Dec 6, 2024.

Exchange Log Collector help wanted Issue Triage
Dominant language
PowerShell
Stars
1.3k
Forks
395
Avg merge
14h 7m
Merged PRs (30d)
5

Description

Describe the issue
ExchangeLogCollector fails to collect the DailyPerformanceLogs if a customer changes the path to a non-default one.

Expected behavior
Script should be able to collect the daily performance logs even if the path was changed.
We should decide if this is something we want to support or if we want to show a warning instead.

Additional context
This is, because we're using a static path:

        if ($PassedInfo.DailyPerformanceLogs) {
            #Daily Performance Logs are always by days worth
            $copyFrom = "$Script:localExInstall`Logging\Diagnostics\DailyPerformanceLogs"

            try {
                $logmanOutput = logman ExchangeDiagnosticsDailyPerformanceLog
                $logmanRootPath = $logmanOutput | Select-String "Root Path:"

                if (!$logmanRootPath.ToString().Contains($copyFrom)) {
                    $copyFrom = $logmanRootPath.ToString().Replace("Root Path:", "").Trim()
                    Write-Verbose "Changing the location to get the daily performance logs to '$copyFrom'"
                }
            } catch {
                Write-Verbose "Couldn't get logman info to verify Daily Performance Logs location"
                Invoke-CatchActions
            }
            Add-LogCopyBasedOffTimeTaskAction $copyFrom "Daily_Performance_Logs"
        }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.