nicolonsky / IntuneDriveMapping

Generate PowerShell scripts to map network drives on Intune managed Windows 10 devices
https://intunedrivemapping.azurewebsites.net/
MIT License
148 stars 17 forks source link

Performance issues with DriveMapping Script #47

Open rpertusio opened 1 year ago

rpertusio commented 1 year ago

Can you create a variation of the script that removes the PARENT group lookup? (We use nested groups, but NOT for drive mapping.)

WITH parent group lookup = 53 seconds $searcher.Filter = "(member:1.2.840.113556.1.4.1941:=$distinguishedName)"

WITHOUT parent group lookup = 0.2 seconds $searcher.Filter = "(member=$distinguishedName)"

The parent group lookup (53 seconds per PC) caused our domain controllers to max out CPU when thousands of devices started using the script. We have tens of thousands of objects to lookup in our AD.