Marcus Schommlersysdive.net·Aug 18, 2023Conditionally Redirecting Output from Inside a Powershell Script FileIf you look at documentation and examples about output redirection in Powershell, you'll often find code showing you how to redirect e.g. Write-Warning on the command line level like shown here: .\script.ps1 3> warnings.log Usually, it's best practi...166 readsPowershell