If possible can you integrate the terminal command history that works nicely in VS Code for powershell. Good description of the functionality here: https://dzhavat.github.io/2022/07/15/quick-pick-terminal-commands-in-vs-code.html