When using the following LOC in a custom Powershell function that essentially was a "Wait until any key is pressed" called from a script:
[System.Console]::ReadKey($true)
… later on, particularly when the function returned or completed its context I got:
KeyChar Key Modifiers
------- --- ---------
... Enter 0
Q: How to avoid this??