Run this Profile as Admin starts Windows Powershell instead of Powershell7 #19911

Closed
opened 2026-01-31 06:57:12 +00:00 by claunia · 4 comments
Owner

Originally created by @leoniDEV on GitHub (May 20, 2023).

Windows Terminal version

1.17.1023

Windows build number

10.0.25352.0

Other Software

No response

Steps to reproduce

Create and account of type administrator;
Create a Windows Terminal's profile for Powershell7
In Windows Terminal set a profile for Windows Powershell as default profile;

Create an account of type standard;
login with this standard account;
Create a Windows Terminal's profile for Powershel7 an set Run this profile as Administrator to on
Try to open this Pwsh7 profile;
enter credential of the account of type administrator

Expected Behavior

Open a new elevated instance of Windows Terminal running Powershell 7

Actual Behavior

A new elevated instance of Windows Terminal is opened with the default profile loaded

Originally created by @leoniDEV on GitHub (May 20, 2023). ### Windows Terminal version 1.17.1023 ### Windows build number 10.0.25352.0 ### Other Software _No response_ ### Steps to reproduce Create and account of type administrator; Create a Windows Terminal's profile for `Powershell7` In Windows Terminal set a profile for `Windows Powershell` as default profile; Create an account of type standard; login with this standard account; Create a Windows Terminal's profile for `Powershel7` an set `Run this profile as Administrator` to `on` Try to open this `Pwsh7` profile; enter credential of the account of type administrator ### Expected Behavior Open a new elevated instance of Windows Terminal running Powershell 7 ### Actual Behavior A new elevated instance of Windows Terminal is opened with the default profile loaded
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:57:12 +00:00
Author
Owner

@leoniDEV commented on GitHub (May 20, 2023):

I think I understand what happen, when open a new tab, wt use the command new-tab --profile {GUID}, this GUID is the one of the profile in the settings of the standard account, but when try to open a profile as admin (when the admin is another account) it load the settings from the admin account which doesn't contains the GUID that wt try to load and then the default profile is loaded.

As a workaround I copied the GUID of the Powershell profile from the standard account to the Powershell profile in the setting file of the admin account.

@leoniDEV commented on GitHub (May 20, 2023): I think I understand what happen, when open a new tab, `wt` use the command `new-tab --profile {GUID}`, this `GUID` is the one of the profile in the settings of the standard account, but when try to open a profile as admin (when the admin is another account) it load the settings from the admin account which doesn't contains the `GUID` that `wt` try to load and then the default profile is loaded. As a workaround I copied the `GUID` of the Powershell profile from the standard account to the Powershell profile in the setting file of the admin account.
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2023):

Ho boy this is a good edge case here. I don't think any of us considered that "Run as Admin" (where the admin account != your current user account) uses the settings from the admin account, not your own.

@zadjii-msft commented on GitHub (May 22, 2023): Ho boy this is a good edge case here. I don't think any of us considered that "Run as Admin" (where the admin account != your current user account) **uses the settings from the admin account**, not your own.
Author
Owner

@carlos-zamora commented on GitHub (Jun 5, 2023):

Hey @leoniDEV! Thanks for filing, we're going to mark this as a dup of #11111.

/dup #11111

@carlos-zamora commented on GitHub (Jun 5, 2023): Hey @leoniDEV! Thanks for filing, we're going to mark this as a dup of #11111. /dup #11111
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jun 5, 2023):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Jun 5, 2023): 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#19911