error 0x800700c1 when launching `powershell.exe' #8411

Closed
opened 2026-01-31 01:28:46 +00:00 by claunia · 34 comments
Owner

Originally created by @AT-AT-33 on GitHub (May 21, 2020).

Environment
Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Windows Terminal version (if applicable): 1.0.1401.0

Steps to reproduce
Open PowerShell tab within Windows Terminal.
This same error occurred in previous versions.

Expected behavior
PowerShell tab opens without error

Actual behavior
[error 0x800700c1 when launching `powershell.exe']

Terminal

Additional information: I do not have "c:\program" as a file or folder.

Originally created by @AT-AT-33 on GitHub (May 21, 2020). **Environment** Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version (if applicable): 1.0.1401.0 **Steps to reproduce** Open PowerShell tab within Windows Terminal. This same error occurred in previous versions. **Expected behavior** PowerShell tab opens without error **Actual behavior** [error 0x800700c1 when launching `powershell.exe'] <img width="439" alt="Terminal" src="https://user-images.githubusercontent.com/65717741/82562240-d57b5d00-9b42-11ea-9dba-86799cf09a78.PNG"> Additional information: I do not have "c:\program" as a file or folder.
Author
Owner

@DHowett commented on GitHub (May 22, 2020):

This is really unusual. Are you on an ARM64 device, perchance?

@DHowett commented on GitHub (May 22, 2020): This is really unusual. Are you on an ARM64 device, perchance?
Author
Owner

@AT-AT-33 commented on GitHub (May 22, 2020):

I am not on an ARM64 device.

@AT-AT-33 commented on GitHub (May 22, 2020): I am not on an ARM64 device.
Author
Owner

@DHowett commented on GitHub (May 25, 2020):

From Command Prompt, can you share the output of path?

@DHowett commented on GitHub (May 25, 2020): From Command Prompt, can you share the output of `path`?
Author
Owner

@AT-AT-33 commented on GitHub (May 26, 2020):

tempsnip

@AT-AT-33 commented on GitHub (May 26, 2020): ![tempsnip](https://user-images.githubusercontent.com/65717741/82849772-73ff1980-9ec7-11ea-9fda-f6ef93648a27.png)
Author
Owner

@zadjii-msft commented on GitHub (May 26, 2020):

Wait is this the "you have to manually open conhost.exe at least once" issue?

@AT-AT-33 Does this only repro for powershell.exe, or does cmd.exe not work either?

If cmd does work, can you launch powershell.exe in that tab, form cmd? or does that just return straight back to cmd?

@zadjii-msft commented on GitHub (May 26, 2020): Wait is this the "you have to manually open `conhost.exe` at least once" issue? @AT-AT-33 Does this only repro for `powershell.exe`, or does `cmd.exe` not work either? If `cmd` does work, can you launch `powershell.exe` in that tab, form cmd? or does that just return straight back to cmd?
Author
Owner

@AT-AT-33 commented on GitHub (May 26, 2020):

I'm not sure about the conhost.exe issue (haven't seen it before).

This only occurs for the powershell.exe tab. None of the others that i've tested have this issue (command prompt and WSL work).

Launching powershell.exe from cmd prompt in the Terminal used to work, I believe, on previous versions. I recall trying to open PS from the cmd prompt earlier and it worked...Now I get the "this app can't run on your PC" message.

@AT-AT-33 commented on GitHub (May 26, 2020): I'm not sure about the conhost.exe issue (haven't seen it before). This only occurs for the powershell.exe tab. None of the others that i've tested have this issue (command prompt and WSL work). Launching powershell.exe from cmd prompt in the Terminal used to work, I believe, on previous versions. I recall trying to open PS from the cmd prompt earlier and it worked...Now I get the "this app can't run on your PC" message.
Author
Owner

@zadjii-msft commented on GitHub (May 28, 2020):

Well that's bonkers. What version of Powershell do you have installed? Does it work fine outside the Terminal (like, in the legacy console)? Have you done anything to change your powershell profile (the ps1 file, not the WT profile)?

I've never seen anything like this before. I mean there's #4322, but I doubt that's it

@zadjii-msft commented on GitHub (May 28, 2020): Well that's bonkers. What version of Powershell do you have installed? Does it work fine outside the Terminal (like, in the legacy console)? Have you done anything to change your powershell profile (the `ps1` file, not the WT profile)? I've never seen anything like this before. I mean there's #4322, but I doubt that's it
Author
Owner

@AT-AT-33 commented on GitHub (May 28, 2020):

PS version is 5.1

PowerShell and the ISE work fine otherwise. I haven't noticed any odd behavior there.

I haven't had a need to modify my PS1 profile settings so I double checked that the file exists - it did not. I created the ps1 file so it's empty. I checked WT and still get the same error in the PS tab.

I did see your previous issue when I first started researching this error, so as a sanity check here's the list of the root of c:\

Directory: C:\

Mode LastWriteTime Length Name


d----- 10/30/2018 2:06 PM ATVision Pro
d----- 10/30/2018 12:41 AM Intel
d----- 10/2/2019 11:20 AM ISO
d----- 11/20/2019 2:30 PM logs
d----- 3/19/2019 12:52 AM PerfLogs
d-r--- 5/27/2020 12:56 PM Program Files
d-r--- 5/1/2020 3:58 PM Program Files (x86)
d----- 2/4/2020 2:51 PM Scripts
d----- 12/17/2019 11:39 AM symcache
d----- 5/22/2020 4:08 PM temp
d----- 5/14/2020 10:11 AM temp1
d----- 10/15/2019 2:01 PM Tools
d-r--- 5/21/2020 9:21 AM Users
d----- 5/27/2020 12:56 PM Windows
d----- 10/10/2019 1:35 PM _MyLocal
-a---- 4/16/2019 2:16 PM 1024 .rnd
-a---- 2/10/2019 2:32 PM 0 Inventory.db

@AT-AT-33 commented on GitHub (May 28, 2020): PS version is 5.1 PowerShell and the ISE work fine otherwise. I haven't noticed any odd behavior there. I haven't had a need to modify my PS1 profile settings so I double checked that the file exists - it did not. I created the ps1 file so it's empty. I checked WT and still get the same error in the PS tab. I did see your previous issue when I first started researching this error, so as a sanity check here's the list of the root of c:\ Directory: C:\ Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 10/30/2018 2:06 PM ATVision Pro d----- 10/30/2018 12:41 AM Intel d----- 10/2/2019 11:20 AM ISO d----- 11/20/2019 2:30 PM logs d----- 3/19/2019 12:52 AM PerfLogs d-r--- 5/27/2020 12:56 PM Program Files d-r--- 5/1/2020 3:58 PM Program Files (x86) d----- 2/4/2020 2:51 PM Scripts d----- 12/17/2019 11:39 AM symcache d----- 5/22/2020 4:08 PM temp d----- 5/14/2020 10:11 AM temp1 d----- 10/15/2019 2:01 PM Tools d-r--- 5/21/2020 9:21 AM Users d----- 5/27/2020 12:56 PM Windows d----- 10/10/2019 1:35 PM _MyLocal -a---- 4/16/2019 2:16 PM 1024 .rnd -a---- 2/10/2019 2:32 PM 0 Inventory.db
Author
Owner

@ve08 commented on GitHub (Jun 9, 2020):

Environment:
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.18363 N/A Build 18363

Steps to reproduce
Open PowerShell Core tab within Windows Terminal.

Expected behavior
PowerShell Core tab opens without error

Actual behavior
[error 0x800700c1 when launching `C:\Users\Vlad Magereanu.dotnet\tools\pwsh.exe']

image

I have a similar problem, but it happens with Power Shell Core which was installed globally using dotnet tool install command.

@ve08 commented on GitHub (Jun 9, 2020): Environment: OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.18363 N/A Build 18363 Steps to reproduce Open PowerShell Core tab within Windows Terminal. Expected behavior PowerShell Core tab opens without error Actual behavior [error 0x800700c1 when launching `C:\Users\Vlad Magereanu\.dotnet\tools\pwsh.exe'] ![image](https://user-images.githubusercontent.com/20930956/84127857-0e229e00-aa40-11ea-92bc-1d3ccd63a447.png) I have a similar problem, but it happens with Power Shell Core which was installed globally using dotnet tool install command.
Author
Owner

@DHowett commented on GitHub (Jun 10, 2020):

You know, this is really strange. I've got a crazy idea.

I'm a little worried that the pseudoconsole host (OpenConsole.exe) is failing, and we've been thinking about this the wrong way.

Can you open a PowerShell window and run the following commands? It could be a wild ride, so I'll leave comments explaining what we're doing.

# Get the path to Windows Terminal
$PackagePath = (Get-AppxPackage Microsoft.WindowsTerminal).InstallLocation

# Copy OpenConsole to a temporary location
Copy $PackagePath\OpenConsole.exe $Env:TEMP\

# Run it
& $Env:TEMP\OpenConsole.exe

If it all goes to plan, you should be staring at a new window running CMD. If this EXE fails to launch, then we've gotten one step closer to figuring out why it's not working.

@DHowett commented on GitHub (Jun 10, 2020): You know, this is really strange. I've got a crazy idea. I'm a little worried that the pseudoconsole host (OpenConsole.exe) is failing, and we've been thinking about this the wrong way. Can you open a PowerShell window and run the following commands? It could be a wild ride, so I'll leave comments explaining what we're doing. ```powershell # Get the path to Windows Terminal $PackagePath = (Get-AppxPackage Microsoft.WindowsTerminal).InstallLocation # Copy OpenConsole to a temporary location Copy $PackagePath\OpenConsole.exe $Env:TEMP\ # Run it & $Env:TEMP\OpenConsole.exe ``` If it all goes to plan, you should be staring at a new window running CMD. If _this_ EXE fails to launch, then we've gotten one step closer to figuring out why it's not working.
Author
Owner

@ve08 commented on GitHub (Jun 10, 2020):

I've followed the steps and the result was as expected:

image

I can open cmd, Windows PowerShell, Ubuntu, Azure Cloud Shell in windows terminal but the problem with PowerShell Core still persists.

@ve08 commented on GitHub (Jun 10, 2020): I've followed the steps and the result was as expected: ![image](https://user-images.githubusercontent.com/20930956/84237418-9add6280-aaf9-11ea-9545-1941fb844f13.png) I can open cmd, Windows PowerShell, Ubuntu, Azure Cloud Shell in windows terminal but the problem with PowerShell Core still persists.
Author
Owner

@ve08 commented on GitHub (Jun 10, 2020):

After the test, I uninstalled the dotnet tool installed PowerShell version and installed the same version using the .msi package. Windows Terminal has no problem opening up the PowerShell Core session.

After that I installed again using dotnet tool install method, but I get the same error. Might have something to do with the fact the folder where pwsh.exe is installed contains spaces?

@ve08 commented on GitHub (Jun 10, 2020): After the test, I uninstalled the dotnet tool installed PowerShell version and installed the same version using the .msi package. Windows Terminal has no problem opening up the PowerShell Core session. After that I installed again using dotnet tool install method, but I get the same error. Might have something to do with the fact the folder where pwsh.exe is installed contains spaces?
Author
Owner

@AT-AT-33 commented on GitHub (Jun 10, 2020):

My attempt failed to open a new command prompt because it was blocked by "group policy" (really it's Applocker blocking OpenConsole.exe on my work computer). The applocker log shows it blocking the file: "c:\users..\APPDATA\LOCAL\TEMP\OPENCONSOLE.EXE was prevented from running"

One other coworker has Terminal installed but does not have this issue (he did not perform these steps. His PS tab in Terminal worked immediately).

Edit: I opened a new PS tab in Terminal and Applocker did not block anything new but the error was still present.

Capture
@AT-AT-33 commented on GitHub (Jun 10, 2020): My attempt failed to open a new command prompt because it was blocked by "group policy" (really it's Applocker blocking OpenConsole.exe on my work computer). The applocker log shows it blocking the file: "c:\users\..\APPDATA\LOCAL\TEMP\OPENCONSOLE.EXE was prevented from running" One other coworker has Terminal installed but does not have this issue (he did not perform these steps. His PS tab in Terminal worked immediately). Edit: I opened a new PS tab in Terminal and Applocker did not block anything new but the error was still present. <img width="596" alt="Capture" src="https://user-images.githubusercontent.com/65717741/84277148-17c00a80-ab01-11ea-9fb6-10ccbe9c7e7d.PNG">
Author
Owner

@xmha97 commented on GitHub (Jun 16, 2020):

I also have this problem when I run the following command:

%LocalAppData%\Microsoft\WindowsApps\wt.exe -p "PowerShell" "D:\1.ps1"
@xmha97 commented on GitHub (Jun 16, 2020): I also have this problem when I run the following command: ``` %LocalAppData%\Microsoft\WindowsApps\wt.exe -p "PowerShell" "D:\1.ps1" ```
Author
Owner

@DHowett commented on GitHub (Jun 16, 2020):

that’s because you can’t launch a ps1 file directly. You need to specify “Powershell.exe -f whatever.ps1”.

@DHowett commented on GitHub (Jun 16, 2020): that’s because you can’t launch a ps1 file directly. You need to specify “Powershell.exe -f whatever.ps1”.
Author
Owner

@xmha97 commented on GitHub (Jun 16, 2020):

that’s because you can’t launch a ps1 file directly. You need to specify “Powershell.exe -f whatever.ps1”.

Please explain more, I did not understand.
I need wt.exe command line.

@xmha97 commented on GitHub (Jun 16, 2020): > > > that’s because you can’t launch a ps1 file directly. You need to specify “Powershell.exe -f whatever.ps1”. Please explain more, I did not understand. I need wt.exe command line.
Author
Owner

@DHowett commented on GitHub (Jun 16, 2020):

wt.exe -p PowerShell powershell -f whatever.ps1

@DHowett commented on GitHub (Jun 16, 2020): `wt.exe -p PowerShell powershell -f whatever.ps1`
Author
Owner

@xmha97 commented on GitHub (Jun 16, 2020):

wt.exe -p PowerShell powershell -f whatever.ps1

OK, Thanks.

@xmha97 commented on GitHub (Jun 16, 2020): > > > `wt.exe -p PowerShell powershell -f whatever.ps1` OK, Thanks.
Author
Owner

@DHowett commented on GitHub (Jun 26, 2020):

Alright, we don't have a repro for this but I'm taking Triage off it and leaving it on the backlog. It could be applocker-related, or it could not be, but it's very strange that the pseudoconsole will launch for cmd but not for powershell here.

One more quick sanity check:

if you add a new custom profile that hardcodes the path to Windows PowerShell... does it work?

{
	"name": "PowerShell Test",
	"commandline": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
}

If so, I have an idea about how to fix this and a heap of other trouble we've been hitting. 😄

@DHowett commented on GitHub (Jun 26, 2020): Alright, we don't have a repro for this but I'm taking Triage off it and leaving it on the backlog. It could be applocker-related, or it could not be, but it's very strange that the pseudoconsole will launch for cmd but not for powershell here. One more quick sanity check: if you add a new custom profile that _hardcodes the path to Windows PowerShell_... does it work? ```json { "name": "PowerShell Test", "commandline": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" } ``` If so, I have an idea about how to fix this and a heap of other trouble we've been hitting. :smile:
Author
Owner

@AT-AT-33 commented on GitHub (Jun 26, 2020):

Hard coding the path worked!

Edit: I noticed the comments in the commit. I found powershell.exe (0KB) in c:\windows\system32. I renamed it to .old, reopened the terminal and the PS tab opened correctly. The 0KB powershell.exe file was last modified on 10/17/2019 if that helps in any way.

PS-Github
@AT-AT-33 commented on GitHub (Jun 26, 2020): Hard coding the path worked! Edit: I noticed the comments in the commit. I found powershell.exe (0KB) in c:\windows\system32. I renamed it to .old, reopened the terminal and the PS tab opened correctly. The 0KB powershell.exe file was last modified on 10/17/2019 if that helps in any way. <img width="627" alt="PS-Github" src="https://user-images.githubusercontent.com/65717741/85861482-6c64b600-b78e-11ea-8c83-557ebb19a0b6.PNG">
Author
Owner

@DHowett commented on GitHub (Jun 26, 2020):

That’s great!

This also means that you have a stray file named “powershell.exe” somewhere on your system that isn’t the real one. Be careful! You might want to figure out where it is and where it came from, and why it’s not an actual executable file.

@DHowett commented on GitHub (Jun 26, 2020): That’s great! This also means that you have a stray file named “powershell.exe” somewhere on your system that isn’t the real one. Be careful! You might want to figure out where it is and where it came from, and why it’s not an actual executable file.
Author
Owner

@AT-AT-33 commented on GitHub (Jun 26, 2020):

Thanks. I removed it from the system. I have no idea how it got there but that seems to have resolved my issue. Thanks for the help!

@AT-AT-33 commented on GitHub (Jun 26, 2020): Thanks. I removed it from the system. I have no idea how it got there but that seems to have resolved my issue. Thanks for the help!
Author
Owner

@DHowett commented on GitHub (Jun 26, 2020):

I’m just sorry it took so long!

The next updates to Terminal will hardcode the path, since we have seen a couple issues that we can resolve by doing that. Thanks so much for your patience!

@DHowett commented on GitHub (Jun 26, 2020): I’m just sorry it took so long! The next updates to Terminal will hardcode the path, since we have seen a couple issues that we can resolve by doing that. Thanks so much for your patience!
Author
Owner

@ghost commented on GitHub (Jun 30, 2020):

:tada:This issue was addressed in #6684, which has now been successfully released as Windows Terminal v1.0.1811.0.🎉

Handy links:

@ghost commented on GitHub (Jun 30, 2020): :tada:This issue was addressed in #6684, which has now been successfully released as `Windows Terminal v1.0.1811.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.0.1811.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jun 30, 2020):

:tada:This issue was addressed in #6684, which has now been successfully released as Windows Terminal Preview v1.1.1812.0.🎉

Handy links:

@ghost commented on GitHub (Jun 30, 2020): :tada:This issue was addressed in #6684, which has now been successfully released as `Windows Terminal Preview v1.1.1812.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.1.1812.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@tiksn commented on GitHub (Nov 15, 2020):

This still happens to me on a PC that user name has my full name with space in the middle.

I am using Microsoft Store version of PowerShell 7.1 (to avoid manual updates)

[error 0x800700c1 when launching `C:\Users\Tigran Torosyan\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe']

@tiksn commented on GitHub (Nov 15, 2020): This still happens to me on a PC that user name has my full name with space in the middle. I am using Microsoft Store version of PowerShell 7.1 (to avoid manual updates) > [error 0x800700c1 when launching `C:\Users\Tigran Torosyan\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe']
Author
Owner

@leobeeson commented on GitHub (Oct 24, 2021):

@tiksn How did you solve your problem? I'm having the same problem on a PC in which a system admin created my user name with a space in between the first and last name.

I've deleted the executable at `C:\Users\FirstName LastName\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe'.

I've also tried adding another pwsh.exe to Windows Terminal's settings:
commandline": "C:\\Users\\FirstName LastName\\AppData\\Local\\Microsoft\\WindowsApps\\pwsh.exe"

Still I get the [error 0x800700c1 when launching ...]

Thanks.

@leobeeson commented on GitHub (Oct 24, 2021): @tiksn How did you solve your problem? I'm having the same problem on a PC in which a system admin created my user name with a space in between the first and last name. I've deleted the executable at `C:\Users\FirstName LastName\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe'. I've also tried adding another pwsh.exe to Windows Terminal's settings: `commandline": "C:\\Users\\FirstName LastName\\AppData\\Local\\Microsoft\\WindowsApps\\pwsh.exe"` Still I get the `[error 0x800700c1 when launching ...]` Thanks.
Author
Owner

@christianparpart commented on GitHub (Nov 13, 2021):

Funny, I'm getting the same error since some time now and now I wanted to address this and so came here. I'm having also Win10 64-bit, all up-to-date (as of today), so is Windows Terminal up-to-date from store, as is Power Shell Core. I can manually start it up but not via menu entry, which loos something like this:

            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            }

I wonder what I might have done wrong, given that this ticket is sadly closed already. :)

@christianparpart commented on GitHub (Nov 13, 2021): Funny, I'm getting the same error since some time now and now I wanted to address this and so came here. I'm having also Win10 64-bit, all up-to-date (as of today), so is Windows Terminal up-to-date from store, as is Power Shell Core. I can manually start it up but not via menu entry, which loos something like this: ```json { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore" } ``` I wonder what I might have done wrong, given that this ticket is sadly closed already. :)
Author
Owner

@DHowett commented on GitHub (Nov 15, 2021):

@christianparpart huh! Could you grab the commandline from the settings UI for that profile? It might be more enlightening than the JSON snippet.

@DHowett commented on GitHub (Nov 15, 2021): @christianparpart _huh_! Could you grab the commandline from the settings UI for that profile? It might be more enlightening than the JSON snippet.
Author
Owner

@christianparpart commented on GitHub (Nov 19, 2021):

@christianparpart huh! Could you grab the commandline from the settings UI for that profile? It might be more enlightening than the JSON snippet.

Actual error on screen (WT):

[error 0x800700c1 when launching `C:\Users\Christian Parpart\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe']

@DHowett, sorry for the delay, I'm not every day on Windows. :)

The settings UI tells me that:

C:\Users\Christian Parpart\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe

This is weird, because using my own TE and CD'ing into pwsh.exe's parent directory, then hitting .\pwsh.exe actually starts it up.

Weird also is that clicking on "Browse file" button right next to the "Command Line" input field containing the above string will not show me the directory containing that executable but the default view.

@christianparpart commented on GitHub (Nov 19, 2021): > > > @christianparpart _huh_! Could you grab the commandline from the settings UI for that profile? It might be more enlightening than the JSON snippet. Actual error on screen (WT): ``` [error 0x800700c1 when launching `C:\Users\Christian Parpart\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe'] ``` @DHowett, sorry for the delay, I'm not every day on Windows. :) The settings UI tells me that: ``` C:\Users\Christian Parpart\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe ``` This is weird, because using my own TE and CD'ing into pwsh.exe's parent directory, then hitting `.\pwsh.exe` actually starts it up. Weird also is that clicking on "Browse file" button right next to the "Command Line" input field containing the above string will not show me the directory containing that executable but the default view.
Author
Owner

@derekschinke commented on GitHub (Dec 20, 2021):

+1 for this issue. Have a space in my name like @tiksn @leobeeson and @christianparpart, and Terminal fails to launch the Microsoft Store version of PowerShell

@derekschinke commented on GitHub (Dec 20, 2021): +1 for this issue. Have a space in my name like @tiksn @leobeeson and @christianparpart, and Terminal fails to launch the Microsoft Store version of PowerShell
Author
Owner

@HylianSteel commented on GitHub (Dec 26, 2021):

Chiming in to say that I've experienced the same issue on one computer with a user that has a space in the user name (for example John Doe) but that issue is non-existent on another computer with another user that has a space in their name.

I did find that putting the command line parameter in quotes would get the ms store powershell version working with Terminal again.

Example: "C:\Users\USER NAME\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe" -nologo

@HylianSteel commented on GitHub (Dec 26, 2021): Chiming in to say that I've experienced the same issue on one computer with a user that has a space in the user name (for example John Doe) but that issue is non-existent on another computer with another user that has a space in their name. I did find that putting the command line parameter in quotes would get the ms store powershell version working with Terminal again. Example: "C:\Users\USER NAME\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe" -nologo
Author
Owner

@leobeeson commented on GitHub (Dec 26, 2021):

OK, so I explored a bit with @HylianSteel's suggestion and I can now open PowerShell Core from Windows Terminal.

Specifically, I added literal quotes (i.e. \") around the executable's path.

For others like me with little experience, here's how my PowerShell Core profile looks like:

{
     "guid": "{514a723a-2c1f-4c87-ca2d-b1423b102421}",
     "hidden": false,
     "name": "PowerShell",
     "source": "Windows.Terminal.PowershellCore",
     "commandline": "\"C:\\Users\\FirstName LastName\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\""
}

Notice how the value for commandline starts with "\" and ends with \"".

Just make sure to use your actual guid, i.e. the guid that appears in your settings.json file for PowerShell Core.

Thanks @HylianSteel

@leobeeson commented on GitHub (Dec 26, 2021): OK, so I explored a bit with @HylianSteel's suggestion and I can now open PowerShell Core from Windows Terminal. Specifically, I added literal quotes (i.e. `\"`) around the executable's path. For others like me with little experience, here's how my PowerShell Core profile looks like: ``` { "guid": "{514a723a-2c1f-4c87-ca2d-b1423b102421}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore", "commandline": "\"C:\\Users\\FirstName LastName\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe\"" } ``` Notice how the value for `commandline` starts with `"\"` and ends with `\""`. #### Just make sure to use your actual `guid`, i.e. the guid that appears in your settings.json file for PowerShell Core. Thanks @HylianSteel
Author
Owner

@euclidesdry commented on GitHub (Jan 1, 2022):

It worked perfectly!!!

Thank You @leobeeson!

@euclidesdry commented on GitHub (Jan 1, 2022): > It worked perfectly!!! Thank You @leobeeson!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8411