PowerShell

[error 0x800700c1 when launching `C:\Program Files\PowerShell\7\pwsh.exe’]

I’ve recently upgraded to the latest Windows Terminal version (1.8.1521.0). Today after a well overdue restart of my computer, opening Windows Terminal with PowerShell configured as my default profile presented me with [error 0x800700c1 when launching `C:\Program Files\PowerShell\7\pwsh.exe’].

Some quick searching to see if this was common turned up this old issue in the Windows Terminal GitHub Repo issues list. None of those suggestions were any good for me. I checked to see if PWSH was in fact in the C:\Program Files\PowerShell\7 path, and sure enough it is.

Fixing [error 0x800700c1 when launching `C:\Program Files\PowerShell\7\pwsh.exe’]

EDIT: 2 July 2021. It has transpired that an update
to the Citrix Receiver on my workstation had dumped
an install log into a file name 'program' in the
root of my C:\. Rename or delete that file and all
works as expected again. 

Going out on a limb and based on the historical issues I wondered if the space in the directory path was causing issues. I opened a command prompt and changed to the root of my C: drive and used the dir /x command to get the 8.3 formatted paths for files and directories.

On my computer c:\program files is c:\progra~1 in 8.3 DOS format.

Opening the Windows Terminal Settings and editing the PowerShell profile command line path, I changed the path from c:\program files\powershell\7\pwsh.exe to c:\progra~1\PowerShell\7\pwsh.exe and selected Save.

Reopening Windows Terminal, now gave me my PowerShell console as required and expected.

Summary

Sometimes old issues are new issues again. I’ve logged the issue on the Windows Terminal GitHub Repo here.

Darren Robinson

Bespoke learnings from a Microsoft Identity and Access Management Architect using lots of Microsoft Identity Manager, Azure Active Directory, PowerShell, SailPoint IdentityNow and Lithnet products and services.

View Comments

Recent Posts

Visualising your IP Address using PowerShell and AI

A few weeks back the Microsoft AI Tour was in Sydney Australia. There was a…

3 weeks ago

Where the heck is the PowerShell Module loading from?

If you're anything like me you always have PowerShell open, and often both PowerShell and…

4 months ago

Express Verified ID Setup

Decentralised Identity is a technology I'm passionate about and have written many posts and tools…

5 months ago

Orchestrating 1Password with PowerShell

Over two years ago I authored a PowerShell Module that enabled the automation of 1Password.…

8 months ago

Entra ID Tenant ID & Custom Domains PowerShell Module

Buried in my PowerShell Snippets Vol 4 post from 2021 is the PowerShell script and…

8 months ago

Windows Subsystem for Linux instance has terminated

Short post on how to recovery from "The Windows Subsystem for Linux instance has terminated"…

9 months ago

This website uses cookies.