Forum Discussion
Device Remediation status misleading
Hello Eric_H
Welcome to the Microsoft community, my name is Recep I'll be happy to help you today.
Advice:
- Log Output: Ensure that your script outputs log information to a file or another logging mechanism. This can help you track whether the script executed successfully, even if the Intune console doesn't reflect it accurately.
- Review Intune Activity Logs: Check the Intune activity logs for detailed information on script execution. These logs may provide insights into any issues that might be causing the discrepancy in reporting.
- Update Intune Settings: Periodically check for updates in the Intune portal or documentation. https://learn.microsoft.com/en-us/mem/intune/fundamentals/remediations Microsoft might release updates that address reporting issues or improve the overall functionality.
- Custom Reporting: Consider creating custom reports using the Microsoft Graph API or PowerShell to gather detailed information about script execution and remediation status.
# Your remediation script logic here
# Example: Fixing an issue (replace this with your actual remediation logic) # For demonstration purposes, let's assume you're fixing a registry key issue. $RegistryPath = "HKLM:\SOFTWARE\YourApplication" $RegistryProperty = "SomeSetting" $DesiredValue = "CorrectValue"
# Check if the registry key exists and has the correct value if (Test-Path $RegistryPath -and (Get-ItemProperty -Path $RegistryPath).$RegistryProperty -eq $DesiredValue) { Write-Host "Registry key is already remediated. No action needed." } else { # Fix the issue (replace this with your actual remediation logic) New-Item -Path $RegistryPath -Force Set-ItemProperty -Path $RegistryPath -Name $RegistryProperty -Value $DesiredValue
Write-Host "Issue remediated successfully." } |
If I have answered your question, please mark your post as Solved If you like my response, please give it a Like Appreciate your Kudos! Proud to contribute! 🙂 |
- Eric_HDec 04, 2023Iron ContributorSorry for the delayed response. I may have to do some sort of alternative logging to track completion. I just thought the portal itself would be much more useful if it could report accurately.