You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a recommended way to use multi-threading with the PowerShell Graph SDK in Windows PowerShell?
I have tried it so far with PowerShell jobs, but the problem is that in each job the modules have to be re-imported and Connect-MgGraph has to be executed.
In PowerShell 7 you have the advantage of using ForEach-Object -Parallel. If you were to try this in Windows PowerShell, you would have to build runspaces, which makes the whole thing much more complex than with jobs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
Is there a recommended way to use multi-threading with the PowerShell Graph SDK in Windows PowerShell?
I have tried it so far with PowerShell jobs, but the problem is that in each job the modules have to be re-imported and
Connect-MgGraph
has to be executed.In PowerShell 7 you have the advantage of using
ForEach-Object -Parallel
. If you were to try this in Windows PowerShell, you would have to build runspaces, which makes the whole thing much more complex than with jobs.What is the preferred/easiest way here?
Thank you all in advance.
Beta Was this translation helpful? Give feedback.
All reactions