Forum Discussion
robmo
Apr 08, 2024Brass Contributor
Intune Win32 app detection method
Hi, I am attempting to create an Intune Win32 App package that will apply a custom theme to our computers. custom.theme and lockscreen.jpg get copied to C:\Windows\Resources\Themes. A folder na...
- Apr 09, 2024You should have something that writes to STDOUT; you can use Write-Output with the text you write to the log file... Detections work with something STDOUT and an Exit 0 for detected or Exit 1 (or higher) for not detected and start the installation.
Apr 09, 2024
You should have something that writes to STDOUT; you can use Write-Output with the text you write to the log file... Detections work with something STDOUT and an Exit 0 for detected or Exit 1 (or higher) for not detected and start the installation.
- robmoApr 09, 2024Brass Contributor
Is this what you are suggesting?
if($compliant -eq 0) { Add-Content -Path $logFile -Value "Installation is compliant" Write-Output "Installation is compliant" Exit 0 } else { Add-Content -Path $logFile -Value "Installation is not compliant" Write-Output "Installation is not compliant" Exit 1 }
- Apr 09, 2024Yes, that should be it. One Write-Output for Intune with the Exit code and one for your log (the detection script output is also visible in your Intune logs in c: program data, perhaps redundant?).
- robmoApr 09, 2024Brass ContributorThe logging was really about debugging. If I'm confident this is working properly, I would be comfortable with removing the logging feature.
- Apr 09, 2024Yep... not notice any exit code etc, in it
if you want more info robmo about the stdout
https://call4cloud.nl/2022/08/the-ballad-of-buster-exitcodes/