Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to supress the stdin?

$
0
0

Redirect to NULL? I have read about this (not quite sure), but can not remember where.

I want to read entered key, but suppress key input at all

Example:

    foreach ($i in 1,2,3,4,5,6,7) {

        $i
        if ([console]::readkey().key -match 'Q|Escape') { break }

    }

Without playing with $host.ui.rawui.( cursorposition or foregroundcolor )

Thank you in advance


Viewing all articles
Browse latest Browse all 6937

Trending Articles