Search notes:

Powershell module: console: get-consoleLineText

The function get-consoleLineText gets a line of characters from the console-buffer.
If the argument is greater than or equal to 0, it starts counting from the top line (the first line being line number 0), if the argument is negative, it counts backwards from the current line.
The default argument is -1.
Trailing spaces are removed from the string (by calling String.TrimEnd()) unless the -noTrimEnd parameter is used.
PS C:\Users\rene> 'Hello world'
Hello world
PS C:\Users\rene> 7*6
42
PS C:\Users\rene> write-host "$(get-consoleLineText -3), the number is $(get-consoleLineText)"
Hello world, the number is 42

See also

PowerShell module console

Index