Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Start-Process fails to launch new powershell.exe instance with -UseNewEnvironment switch #3545

Copy link
Copy link
@0xfeeddeadbeef

Description

@0xfeeddeadbeef
Issue body actions

Steps to reproduce

I dont know why would anyone do this, but here it goes: you cannot launch another powershell.exe using Start-Process cmdlet with -UseNewEnvironment switch.

Windows PowerShell:

Start-Process -FilePath C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoNewWindow -UseNewEnvironment

PowerShell Core (Debug build):

Start-Process -FilePath .\powershell.exe -NoNewWindow -UseNewEnvironment

Expected behavior

A new instance of powershell.exe console should start.

Actual behavior

Windows PowerShell outputs error and dies:

Internal Windows PowerShell error.  Loading managed Windows PowerShell failed with error 8009001d.

PowerShell Core (Debug build) outputs more errors + assert message and dies:

Error resolving full path []
Error resolving full path []
PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

The shell cannot be started. A failure occurred during initialization:
ASSERT: caller makes sure it's not null or empty

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
GitCommitId                    v6.0.0-alpha.18-9-g8d4db01a5d4b5dcd981ef216d3d7f24b484c7c60-dirty
WSManStackVersion              3.0
CLRVersion
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
PSRemotingProtocolVersion      2.3
PSEdition                      Core
SerializationVersion           1.1.0.1
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Interactive-Consolethe console experiencethe console experience

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.