I am running a command
hg st
and then checking it's $LASTEXITCODE
to check for availability of mercurial in the current directory. I do not care about its output and do not want to show it to my users.
How do I suppress ALL output, success or error?
Since mercurial isn't a PowerShell commandlet hg st | Out-Null
does not work.
2>&1
syntax actually means? – Telemark