Describe the bug
Failure reason is not returned if the first switch statement matches and adds content to the $LogonFailureReason variable.
To Reproduce
Match one of the statements in the first switch statement which looks at $EventRecord.FailureReason
Expected behavior
$LogonFailureReason.ToString() should be placed one level up, and not be nested in the current IF statement.
PowerShell Environment (please complete the following information):
- OS: Windows 10
- Edition desktop
- Version 5.1.18362.1171