-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How we can use Invoke-Parallel to fetch ADUser data? #59
Comments
If you just want to get the
The Hope that helps :) |
Thanks for the update but I was looking to run this in parallel if I want to try for Get-adgroup and get the associated member's details so foreach takes time to calculate so want to check if I can run this to get information for each group parallelly. |
Oh I see. |
Somehow i figured it out but i used maxqueue as 1, because if I put more then 1 it is not fetching detailed information for some groups (not complete within that time). By using maxqueue value 1, it is also almost slow, but getting accurate data. Adding my code, how I figured it out and how I am using it, but might be there is better way to use this so need experts advise :) attaching file. |
I want to get all the users from AD and foreach user I want to fetch multiple properties parallel.
Because ForEach process is taking time to get the details.
sample dummy code.
$users = Get-ADUser -Filter *
ForEach($user in $users){
$SamName = $user.samaccountname
$memberof = $user.memberof
}
The text was updated successfully, but these errors were encountered: