I have an issue with detection code and I am leaning towards a bug.
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,