We use a CMD wrapper in front of the PSADTK for legacy reasons:
You might be able to use that directly in CM12.
set "_Powershell=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe"
"%_Powershell%" "& '%~dp0%FN%.ps1' Install NonInteractive "; exit $LASTEXITCODE
SET ERR=%ERRORLEVEL%
REM CAVEAT: we may get the wrong Exit code in PowerShell v2 (e.g. syntax error=0)
ECHO [%~NX0] SCCM RESULT CODE=%ERR%
TIMEOUT.exe /T 10 /NOBREAK 1>nul 2>nul
EXIT /B %ERR%
Notice the exit $LASTEXITCODEYou might be able to use that directly in CM12.