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.
robmo
Apr 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, 2024
Yes, 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?).