Skip to content

[Issue] - Health Checker - -OutputFilePath not honored for -BuildHtmlServersReport #1717

@JeremyTBradshaw

Description

@JeremyTBradshaw

Provide Version Number
Version 23.05.08.1516

[DO-OVER] Describe the issue
When supplying -BuildHtmlServersReport and -OutputFilePath, -OutputFilePath is not honored, instead current directory is where it lands. This seems to be due to Out-File on line 7835 (as of this version).

Describe the issue
When I supply -OutputFilePath, the destination that I supply is only honored for certain outputs. For example, the server TXT and XML files land where I want, but the Debug file, as well as the script updater log, both land in the script calling user's $PWD. When I try to figure out what's going on in the code, it looks like this should be handled by the function Invoke-SetOutputInstanceLocation, which seems to be called in all the right places. But it's clearly not working. The thing that that is most pressing is that the HTML report is landing somewhere other than what is specified in -OutputFilePath (lands in System32 when I use Scheduled Tasks).

Expected behavior
I expect that all of the script's output files would land in the specified OutputFilePath.

Script Output
N/A, I'm not getting errors and the script is up to date.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions