You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Start-Transcript outputs to "$OutDir\Get-NetView.log", when stopped, host output points to $OutDir. Since the log actually gets moved to "$OutDir_Logs", users aren't aware of where to go for the actual Get-NetView.log.
For potential mitigation, can think of two options:
1)
Pipe Stop-Transcript to Out-Null;
After moving the file, Write-Output your own message pointing to "$logDir\Get-NetView.log" in the try/catch blocks for Stop-Transcript.
2)
Define $logDir in the "Initialize" function instead of "Completion";
Change the Path for Start-Transcript to "$logDir\Get-NetView.log";
Remove Move-Item from the Stop-Transcript try block.
Without knowing what else could break by moving things in option #2, I'd suggestion option #1.
Line | Code
-----|------------------2648|Stop-Transcript|Out-Null2649|<...>2650|Write-Output"Transcript stopped, output file is $logDir\Get-NetView.log"
The text was updated successfully, but these errors were encountered:
Nevember
added a commit
to Nevember/Get-NetView
that referenced
this issue
May 16, 2021
Hi!
Since Start-Transcript outputs to "$OutDir\Get-NetView.log", when stopped, host output points to $OutDir. Since the log actually gets moved to "$OutDir_Logs", users aren't aware of where to go for the actual Get-NetView.log.
For potential mitigation, can think of two options:
1)
Pipe Stop-Transcript to Out-Null;
After moving the file, Write-Output your own message pointing to "$logDir\Get-NetView.log" in the try/catch blocks for Stop-Transcript.
2)
Define $logDir in the "Initialize" function instead of "Completion";
Change the Path for Start-Transcript to "$logDir\Get-NetView.log";
Remove Move-Item from the Stop-Transcript try block.
Without knowing what else could break by moving things in option #2, I'd suggestion option #1.
The text was updated successfully, but these errors were encountered: