Automated filter population in Intune
If you have read the article āPhased deploymentā you should have asked yourself what if I need to automate this filter update process.
Unfortunately, thereās nothing to automate in the Microsoft Intune Admin Center portal. However, if youāre interested in leveraging PowerShell AzureAD and MsGraph module you can accomplish it by following the steps below:
- Connect to AzureAd
- Connect to MsGraph
- Retrieve all members from the filter youāre using as an exclusion list
- Back it up
- Retrieve all members from CrowdStrike Install Phase 2 (sec. group)
- Save a list to a CSV or text file as member history
- Make sure CrowdStrike Install Phase 2 (sec. group) members will always overwrite the existing list
- Work on the JSON format to PATCH the specific filter using graph API
- Update this filter “rule” parameters with the new DEVICES list
Additional steps
In case you have an automation tool, import this script to your tool and track only its events from there.
Be aware that thereās a region 00 ā default in the code referring to the current location.
I always the same folder structure in the DEV environment c:\temp\YYYY\MM\DD\ to work at and save all logs, backup files, and results.
Cheers,
Thiago Beier
One thought on “Automated filter rule update in Intune”
Comments are closed.