How to not save error commands in history in powershell?

236 views Asked by At

Every command I enter are saved in history but I want not to save the command that are shown error in the shell.

what should i add in the powershell config to do that

1

There are 1 answers

0
vonPryz On

Use the Clear-History cmdlet to remove entries from the history. Since history doesn't save results of the commands, you need to remove invalid ones manually.