SyntaxFix
Write A Post
Hire A Developer
Questions
Tip #2
Can't you use the classical 2> redirection operator.
2>
(Get-PSSessionConfiguration -Name "MyShellUri" -ErrorAction SilentlyContinue) 2> $NULL if(!$?){ 'foo' }
I don't like errors so I avoid them at all costs.