GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add S.M.A.PowerShell.Create method overload with Runspace argument by KirkMunro · Pull Request #8057 · PowerShell/PowerShell Conversation
Contributor
PR SummaryWhen invoking multiple PowerShell commands one at a time from an assembly that does not have PowerShell loaded by default, developers should create a runspace first via This PR adds a new PR Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Kirk Munro (KirkMunro)
requested review from
Bruce Payette (BrucePay) and
Dongbo Wang (daxian-dbw)
as code owners
|
There was an error while loading. Please reload this page.
|
Kirk Munro (@KirkMunro) It would be great if you would link two gists with samples before and after the change to demo benefits. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) Good idea: https://gist.github.com/KirkMunro/9288214d59a89b965974852eb985eff5. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Kirk Munro (@KirkMunro) I believe this can be done using the overload for PowerShell/src/System.Management.Automation/engine/hostifaces/PowerShell.cs Lines 853 to 861 in 4e5e390
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aditya Patwardhan (@adityapatwardhan) That only works for one invocation. A single PowerShell instance. The PR allows you to create your runspace and initialize it with the initialSessionState, and then easily use it over, and over, for as many PowerShell instances as you need, keeping each instance in the same runspace that is initialized only once. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@PowerShell/powershell-committee is ok with this change to have an overloaded api rather than requiring setting runspace on the property |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FYI, I'm on vacation this week and through the weekend, so I'll catch up on all of this when I am back at home. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-Authored-By: KirkMunro <[email protected]>
…thub.com/KirkMunro/PowerShell into powershell-create-with-runspace-overload
|
This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) What's the hold up on this one? Is it simply outstanding code reviews? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Kirk Munro (@KirkMunro) Yes, please address the code review feedback. Otherwise, it's good to go. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) Unless I'm missing something there are no outstanding code review changes to make. See the discussion between Paul, Ilya and I. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Kirk Munro (@KirkMunro) you are correct. Unfortunately we're a bit understaffed right now due to the holidays. I expect this to be merged after the new year. Aditya Patwardhan (@adityapatwardhan) should review your changes and approve |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) Could you update your review please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) I merged the change. I thought it was assigned to me. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.