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

Entra Auth Tracer – A Browser Extension for Deep Inspection of Microsoft Entra Authentication Flows

If you've ever needed to debug a Microsoft Entra (Azure AD) authentication flow, you'll know…

2 weeks ago

Entra Provision On Demand PowerShell Module

It’s 2026 and somehow I keep finding myself back in 2016, integrating heritage applications into…

3 weeks ago

Entra News MCP Server

I’ve just published an MCP server that turns Merill & Joshua’s weekly Entra News newsletter…

1 month ago

Entra ECMA2Host Tools PowerShell Module

If you've ever worked with the ECMA2Host for Entra Outbound Provisioning you'll be immediately presented…

4 months ago

PowerShell 7 Support Arrives for the Granfeldt PowerShell Management Agent

For over a decade, the Granfeldt PowerShell Management Agent (PSMA) has been the bedrock for…

6 months ago

PowerShell MCP Azure Function Server

Recently under the experimental Azure Functions build Microsoft Developer Advocates have shown enabling Azure Functions…

7 months ago

This website uses cookies.