PoShEvents icon indicating copy to clipboard operation
PoShEvents copied to clipboard

[BUG] Get-LogonFailureReason stream pollution

Open joshwright10 opened this issue 5 years ago • 0 comments

Describe the bug The System.Text.StringBuilder Append() method outputs a System.Text.StringBuilder object which is shown in the pipeline when called.

This can be resolved by using [void]. For example: [void]$LogonFailureReason.Append("Reason")

To Reproduce Call Get-LogonFailureReason and match any of the switch statements.

Expected behavior No output should be seen, other than the final output object that is expected.

PowerShell Environment (please complete the following information):

  • OS: Windows 10
  • Edition: desktop
  • Version: 5.1.18362.1171

joshwright10 avatar Jan 21 '21 10:01 joshwright10