[lang-ref] ( get_command_return_code ) ( powershell )
It 'should get command return code' {
# $LASTEXITCODE
findstr "127.0.0.1" C:\Windows\System32\drivers\etc\hosts
$LASTEXITCODE | Should -Be 0
findstr "no.such.line" C:\Windows\System32\drivers\etc\hosts
$LASTEXITCODE | Should -Be 1
}