Clearing the terminal screen with visual studio code in powershell [duplicate]

Clearing the terminal screen with visual studio code in powershell [duplicate]
typescript
Ethan Jackson

I am running scripts using virtual studio code, the script outputs a lot of messages which is fine, with every execution I would like to clear the screen such that I do not see previous script logs. If I type cls it tries to clear the screen but I can still see previous screen logs and messages.

Any idea how i can clear the screen and not see previous execution logs.

Answer

try „Clear-Host“ as you are using PowerShell

Related Articles