Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

Terminal text is cleared after calling Out-ConsoleGridView #260

Open

Description

@c3rberus

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

Hello,

I am using Out-ConsoleGridView in my PowerShell script, and I noticed that whenever I call ocgv, any text that was on my terminal before this, is wiped out, similar to calling clear-host before outputting anything selected from ocgv.

Is there any way to call ocgv and preserve the text in the terminal that was there before?

Expected behavior

Write-Host "Hello World!"
echo "123" | ocgv

Hello World!
123

Actual behavior

Write-Host "Hello World!"
echo "123" | ocgv

123

Error details

Environment data

PS C:\Oppy\AdminTools_v2> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.0
PSEdition                      Core
GitCommitId                    7.5.0
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

0.7.7

Visuals

No response

Activity

  1. c3rberus commented on Mar 10, 2025

    @c3rberus
    Author

    Interestingly, if I use -UseNetDriver parameter, it works in that the text that was on the console before calling ocgv is preserved, however this switch is not mentioned in https://github.com/PowerShell/ConsoleGuiTools/blob/main/docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md

  2. tig commented on Mar 10, 2025

    @tig
    Collaborator

    What version of WT are you using?

  3. c3rberus commented on Mar 10, 2025

    @c3rberus
    Author

    Tig (@tig) I am using 1.22.250204002

  4. Podbrushkin commented on May 23, 2025

    @Podbrushkin

    Same, but not actually cleared, but instead filled with an empty space (I can scroll up to what's been on terminal). -UseNetDriver also resolves this issue.

    Windows Terminal
    Version: 1.22.11141.0
    
    Name                           Value
    ----                           -----
    PSVersion                      7.5.1
    PSEdition                      Core
    GitCommitId                    7.5.1
    OS                             Microsoft Windows 10.0.22631
    Platform                       Win32NT
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions