diff --git a/packaging/windows/test.ps1 b/packaging/windows/test.ps1
index 7df3c60e3..4128f327a 100644
--- a/packaging/windows/test.ps1
+++ b/packaging/windows/test.ps1
@@ -1,4 +1,4 @@
 C:\Python27\Scripts\pip.exe install mock
 C:\Python27\Scripts\pip.exe install pylint
 C:\Python27\python.exe C:\Python27\Scripts\trial.py C:\projects\lbry\tests\unit
-
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }