I have a script that pulls ACLs for a given set of paths using the NTFSsecurity Module. I have attempted to speed this up using Invoke-Parallel and I'm seeing some odd behavior. I'm testing with the windows directory on my laptop which is about ~150k directories. The first 3,000 threads or so go very quickly but after that it seems to drag. Local resources aren't an issue as I have memory and CPU to spare while this is running. I'm on Windows 10 creators update with PS 5.1. The original code measures at 3min 8 seconds for the same set of paths. While the parallel code is pushing 30min. My suspicion is this is due to needing to import the module every time so I'm not sure if there is a way to improve this. I opted to import the module in the script block vs -ImportModules so as not to import anything unnecessary.