Nov 17 2021 10:41 AM - edited Nov 17 2021 10:55 AM
Hi,
I have the script below to detect if the config.xml file is deployed. This script runs and deploys the file and I find that in the IntuneManagementExtension log the 'Found XML File' is listed and also believe I have found the app code with 'Detected App'. It seems the exit code is also zero but the application is not detected. This Win32App is running in the user context.
I have checked the admin centre and it says the application is installed but this is not what the company portal says, this says its failed.
Not sure what I am missing. Any thoughts as to why the Company Portal does not reflect the correct status?
# All files created in the month of November
$CheckMonth = "11"
$CheckYear = "2021"
$UserProfile = $env:USERPROFILE
if (Test-Path "$UserProfile\Appdata\Roaming\System\config.xml") {
$FileMonth = (get-item "$UserProfile\Appdata\Roaming\System\dbconfig.xml").Lastwritetime.month
$FileYear = (get-item "$UserProfile\Appdata\Roaming\System\config.xml").Lastwritetime.Year
$FileDay = (get-item "$UserProfile\Appdata\Roaming\System\config.xml").Lastwritetime.Day
If ($FileMonth -ne $CheckMonth) {Exit}
If ($FileYear -ne $CheckYear) {Exit}
Write-Host "Found XML File"
}
Dec 19 2021 03:14 PM