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
Describe the bug
The
System.Text.StringBuilderAppend()method outputs aSystem.Text.StringBuilderobject 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-LogonFailureReasonand 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):