In a PowerShell script automating some SVN tasks I have the following function:
function SvnUrlExists($url) { svn info $url | out-null 2>&1 return
The voted answer generates an error for me. The solution ended up being the following:
cmd /c "MyProgram MyArguments 2>&1" | Out-Null