I am running a command
hg st
and then checking it\'s $LASTEXITCODE to check for availability of mercurial in the current director
$LASTEXITCODE
Can also do this
hg st *> $null
Powershell suppress console output