Skip to content
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

Kansa Core: Consider using PSRunspaces over PSSessions #131

Open
jt-msft opened this issue Sep 10, 2015 · 1 comment
Open

Kansa Core: Consider using PSRunspaces over PSSessions #131

jt-msft opened this issue Sep 10, 2015 · 1 comment

Comments

@jt-msft
Copy link
Collaborator

jt-msft commented Sep 10, 2015

Boe Prox has some sample code and a few blog posts about PSRunspaces that make them seem like a much more performant option for multithreading collection activities.

http://learn-powershell.net/2012/05/10/speedy-network-information-query-using-powershell/
http://learn-powershell.net/2014/06/11/norcal-powershell-user-group-presentation-on-runspaces-is-available/
https://github.com/proxb/PoshRSJob

@secabstraction
Copy link

In powershell v4 Invoke-Command implements runspace jobbing for you ;) If you're talking about remote collections. It does speed up Wmi queries quite effectively though. I know you already have this, but here's a simpler version I wrote: https://gist.github.com/secabstraction/4044f4aadd3ef21f0ca9
I wrote a simple wrapper for Wmi queries if you're interested, Invoke-WmiRunspaceQuery, derived from boe's post above. https://gist.github.com/secabstraction/c484d61cbdec10261c5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants