Microsoft ActiveDirectory PowerShell Module (Microsoft RSAT Download) Isn't Thread-Safe - Remedy? RRS feed

  • General discussion

  • The PowerShell ActiveDirectory module doesn't seem to be thread-safe.

    We wrote a .NET Framework service. The code opens a PowerShell Runspace (NuGet package "System.Management.Automation.dll") that's executing a PowerShell script which queries Active Directory by means of Active Directory Web Services (ADWS).

    Our service spawns a number of threads, so tasks can be processed in parallel. If two threads query Active Directory in parallel (e.g. by both running the Get-ADUser Cmdlet), Active Directory Web Services (ADWS) throws an "invalid enumeration context" SOAP exception.

    Did we perhaps misconfigure our Windows domain controller? Or is this a fault that's supposed to be reported to Microsoft? Where would I report this error?

    On GitHub I created a repository containing an example console application, making it easy to reproduce this issue. On UserVoice I submitted a corresponding "idea".

    • Edited by BetterToday Wednesday, September 11, 2019 10:53 AM
    • Changed type Bill_Stewart Tuesday, April 14, 2020 1:31 PM
    Wednesday, September 11, 2019 10:44 AM

All replies

  • Interesting, but for sure this isn't the right place to report the problem. We're not Microsoft employees and have no insight other than what you've gained already by searching. It sounds like you have found some good places to report this already.

    -- Bill Stewart [Bill_Stewart]

    Wednesday, September 11, 2019 4:10 PM