I\'m using Jenkins PowerShell plugin to build a project.
However, I found that Jenkins always considers my build successful no matter what I type inside Windows P
Windows P
This is how I implemented RRIROWER's solution. Hope it helps.
.ps1; exit $lastexitcode
Make sure your powershell scripts does exit with the desired value. Run "exit " as the last line.
"exit "