Windows Terminal doesn't respond to RunAs correctly from PowerShell or when invoked from a the context menu shortcut #6610

Closed
opened 2026-01-31 00:43:01 +00:00 by claunia · 2 comments
Owner

Originally created by @KUTlime on GitHub (Feb 24, 2020).

Environment

[Environment]::OSVersion
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Get-AppxPackage *terminal*
Windows Terminal version (if applicable):
Name              : Microsoft.WindowsTerminal
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 0.9.433.0
PackageFullName   : Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe
IsFramework       : False
PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False
Dependencies      : {Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.2
                    7810.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

Steps to reproduce

  1. Start Windows PowerShell with elevated privileges.
  2. Type: Start-Process wt -Verb RunAs
  3. A new window of Windows Terminal with elevated privileges appears (or should appear at least).
  4. Start Windows PowerShell with non-elevated privileges.
  5. Type: Start-Process wt -Verb RunAs

RunAsBug

In addition, if the context menu shell shortcut with the RunAs flag exist, e.g. the same functionality as PowerShell Core Windows Installation provides, Windows Terminal does not respond to this at all. For more details about the shortcut, look here. As a developer of this module, feel free to ask questions.

Expected behavior

After typing Start-Process wt -Verb RunAs into non-elevated Windows PowerShell session, UAC dialogue will appear and a new session of Windows Terminal with elevated privileges will appear.

After click on the context menu shell shortcut with the RunAs flag, UAC dialogue will appear and a new session of Windows Terminal with elevated privileges will appear.

Actual behavior

Exception, see the printscreen above. The exception is: System can't access a file.

Related issues:

#4217
https://github.com/KUTlime/PowerShell-Open-Here-Module/issues/3

Originally created by @KUTlime on GitHub (Feb 24, 2020). # Environment ```powershell [Environment]::OSVersion ``` ```none Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 ``` ```powershell Get-AppxPackage *terminal* ``` ```none Windows Terminal version (if applicable): Name : Microsoft.WindowsTerminal Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 0.9.433.0 PackageFullName : Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.9.433.0_x64__8wekyb3d8bbwe IsFramework : False PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False Dependencies : {Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.2 7810.0_x64__8wekyb3d8bbwe} IsPartiallyStaged : False SignatureKind : Store Status : Ok ``` # Steps to reproduce 1. Start Windows PowerShell with elevated privileges. 2. Type: `Start-Process wt -Verb RunAs` 3. A new window of Windows Terminal with elevated privileges appears (_or should appear at least_). 4. Start Windows PowerShell with non-elevated privileges. 5. Type: `Start-Process wt -Verb RunAs` ![RunAsBug](https://user-images.githubusercontent.com/8374320/75140021-5ebef700-56ee-11ea-89f0-99676a38f073.png) In addition, if the context menu shell shortcut with the RunAs flag exist, e.g. the same functionality as PowerShell Core Windows Installation provides, Windows Terminal does not respond to this at all. For more details about the shortcut, look [here](https://github.com/KUTlime/PowerShell-Open-Here-Module). As a developer of this module, feel free to ask questions. # Expected behavior After typing `Start-Process wt -Verb RunAs` into non-elevated Windows PowerShell session, UAC dialogue will appear and a new session of Windows Terminal with elevated privileges will appear. After click on the context menu shell shortcut with the RunAs flag, UAC dialogue will appear and a new session of Windows Terminal with elevated privileges will appear. # Actual behavior Exception, see the printscreen above. The exception is: System can't access a file. # Related issues: #4217 https://github.com/KUTlime/PowerShell-Open-Here-Module/issues/3
claunia added the Resolution-Duplicate label 2026-01-31 00:43:01 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 24, 2020):

/dup #4217 this is currently a platform limitation

@DHowett-MSFT commented on GitHub (Feb 24, 2020): /dup #4217 this is currently a platform limitation
Author
Owner

@ghost commented on GitHub (Feb 24, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Feb 24, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6610