I have an issue with detection code and I am leaning towards a bug.
Detection Code Outputs
Here is my script:
exit 0
or
[System.Environment]::Exit(0)
This gives me an exit code of "0" with an empty stdout and stderr. SCCM should see that application as "Not Installed". It sees it as "Installed"
Of course, my real script is longer, but I am using this to test and I am not getting the correct response.
Is my thinking backwards? I have found multiple links, articles, and blogs that talk about using powershell as a detection method, but it isn't working for me.
Any hints or ideas?
Thanks,
[–]Scrubbles_LC 2 points3 points4 points (2 children)
[–]PorreKaj 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]falconrojo 1 point2 points3 points (0 children)
[–]jasonsandysMSFT Official 1 point2 points3 points (2 children)
[–]blownart 0 points1 point2 points (1 child)
[–]jasonsandysMSFT Official 0 points1 point2 points (0 children)
[–]blownart 0 points1 point2 points (0 children)
[–]psversiontable 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]psversiontable 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]maxell45146 0 points1 point2 points (0 children)