Clearing the terminal screen with visual studio code in powershell [duplicate]
![Clearing the terminal screen with visual studio code in powershell [duplicate]](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F80wy3gkl%2Fproduction%2F54e30bbcb677f725db7afda2ea2f51db97c37e46-1201x631.png&w=3840&q=75)
typescript
Ethan JacksonI 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