Changed LASTEXITCODE to $process.ExitCode