Fortunately, Visual Studio Code has a little terminal you can use to run commands without needing to swap between windows.
By defining Microsoft PowerShell functions within PowerShell modules, you can organize your scripts, avoid duplicating code, ...