terminal: error 0x800700c1 when launching `powershell.exe'

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.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 34 (11 by maintainers)

Commits related to this issue

Most upvoted comments

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

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

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’]

It worked perfectly!!!

Thank You @leobeeson!

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