Update UseNewEnvironment parameter behavior of Start-Process cmdlet on Windows - #10830
Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit intoApr 18, 2020
Conversation
Ilya (iSazonov)
requested review from
Steve Lee (SteveL-MSFT) and
Dongbo Wang (daxian-dbw)
October 18, 2019 11:38
Ilya (iSazonov)
requested a review
from Aditya Patwardhan (adityapatwardhan)
as a code owner
October 18, 2019 11:38
14 tasks
Ilya (iSazonov)
force-pushed
the
update-usenewenvironment-2
branch
from
October 18, 2019 11:42
92fd170 to
2f40ad7
Compare
There was a problem hiding this comment.
Use of CreateEnvironmentBlock() with the user token is great. Did you verify that USERNAME is correct and PATH is complete?
Collaborator
Author
There was a problem hiding this comment.
We could check USERNAME. Checking PATH it would be that we don't trust native API.
Ilya (iSazonov)
force-pushed
the
update-usenewenvironment-2
branch
from
October 21, 2019 12:09
ddd07ba to
ec03e45
Compare
Collaborator
Author
|
Travis Plunk (@TravisEz13) Andrew (@anmenaga) Steve Lee (@SteveL-MSFT) Could you please review? |
Travis Plunk (TravisEz13)
previously requested changes
Feb 4, 2020
Ilya (iSazonov)
force-pushed
the
update-usenewenvironment-2
branch
from
March 29, 2020 08:09
43b2149 to
cffeaa5
Compare
Ilya (iSazonov)
force-pushed
the
update-usenewenvironment-2
branch
from
April 8, 2020 16:53
cffeaa5 to
0f2b8ae
Compare
Aditya Patwardhan (adityapatwardhan)
approved these changes
Apr 13, 2020
Member
|
Ilya (@iSazonov) would it be possible to validate these changes on nano server? |
Collaborator
Author
Oh, I never have nano. Sorry. |
11 tasks
Member
|
Verified it works on docker image for nanoserver. |
|
🎉 Handy links: |
Thatgfsj (Thatgfsj)
pushed a commit
to Thatgfsj/PowerShell
that referenced
this pull request
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
The PR effects only Windows behavior.
See Start-Process -UseNewEnvironment provides an environment that is missing crucial standard environment variables while not supporting passing a new environment #4671 and PowerShell Committee conclusion UseNewEnvironment restores environment variables for child process #10745 (comment)
-Environmentparameter late)PR Context
Replace #10561
Fix #3545
Fix partially #4671
PowerShell Committee conclusion #10745 (comment)
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.