Windows 10: Keep elevated powershell in Windows Terminal

Discus and support Keep elevated powershell in Windows Terminal in Windows 10 Network and Sharing to solve the problem; I'm running Windows Terminal v.1.6.10571.0 and love having my Ubuntu, CMD and Powershell sessions all in WT. However, a few things I need to regularly... Discussion in 'Windows 10 Network and Sharing' started by C-fromEngland, Mar 3, 2021.

  1. Keep elevated powershell in Windows Terminal


    I'm running Windows Terminal v.1.6.10571.0 and love having my Ubuntu, CMD and Powershell sessions all in WT. However, a few things I need to regularly do require me to elevate powershell. When I do this with 'Start-Process Powershell -Verb RunAs' it launches the elevated PS session in a new PS window.


    Is there a way to keep it in WT?


    Or alternatively is there a way to launch WT as admin and therefore my PS session is already elevated? When I try to launch WT as admin, I get the following error:


    Windows cannot find 'C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.6.10571.0_x64__8...WindowsTerminal.exe'.

    Make sure you typed the name correctly, and then try again.


    If I try to launch an admin WT from a normal WT using 'start-process wt.exe -verb RunAs' I get the following error:


    start-process : This command cannot be run due to the error: The system cannot find the file specified.

    At line:1 char:1

    + start-process wt.exe -verb RunAs

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : InvalidOperation: : [Start-Process], InvalidOperationException

    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

    :)
     
    C-fromEngland, Mar 3, 2021
    #1
  2. abpc555 Win User

    non elevated powershell?

    Hi,

    I read that I can uninstall apps via the powershell (elevated), and I indeed did this. But what surprised me was that even a non-elevated powershell prompt allowed me to uninstall a number of apps as well.

    Would this mean that I can even reinstall apps via a non-elevated powershell prompt? If so, is there a way of disabling the powershell?

    Thanks.
     
    abpc555, Mar 3, 2021
    #2
  3. c12f15dc-7bff-4426-b6c1-6cd384eeb051, Mar 3, 2021
    #3
  4. abpc555 Win User

    Keep elevated powershell in Windows Terminal

    non elevated powershell?

    I don't want a standard account user to open a non elevated powershell and install stuff...
     
    abpc555, Mar 3, 2021
    #4
Thema:

Keep elevated powershell in Windows Terminal

Loading...
  1. Keep elevated powershell in Windows Terminal - Similar Threads - Keep elevated powershell

  2. Powershell terminates itself upon startup.

    in Windows 10 Gaming
    Powershell terminates itself upon startup.: I believe i encountered the problem a few months ago or so, everytime i start PowerShell, it simply terminates itself. Before it does though, it displays this error message:Windows PowerShell terminated with the following error: Could not load file or assembly...
  3. Powershell terminates itself upon startup.

    in Windows 10 Software and Apps
    Powershell terminates itself upon startup.: I believe i encountered the problem a few months ago or so, everytime i start PowerShell, it simply terminates itself. Before it does though, it displays this error message:Windows PowerShell terminated with the following error: Could not load file or assembly...
  4. Powershell terminates itself upon startup.

    in Windows 10 BSOD Crashes and Debugging
    Powershell terminates itself upon startup.: I believe i encountered the problem a few months ago or so, everytime i start PowerShell, it simply terminates itself. Before it does though, it displays this error message:Windows PowerShell terminated with the following error: Could not load file or assembly...
  5. Is Terminal the same as Powershell?

    in Windows 10 Gaming
    Is Terminal the same as Powershell?: I just upgraded W10 to W11. Now, I see "Terminal" and "Terminal admin" instead of "PowerShell" and "PowerShell admin". Is Terminal a replacement for PowerShell" or do I need to install PowerShell and if I do, how do I do it?...
  6. Is Terminal the same as Powershell?

    in Windows 10 Software and Apps
    Is Terminal the same as Powershell?: I just upgraded W10 to W11. Now, I see "Terminal" and "Terminal admin" instead of "PowerShell" and "PowerShell admin". Is Terminal a replacement for PowerShell" or do I need to install PowerShell and if I do, how do I do it?...
  7. CMD, PowerShell, Windows Terminal

    in Windows 10 Ask Insider
    CMD, PowerShell, Windows Terminal: I have recently returned to windows after 10 years of OSX/MacOS and Linux. During my time on these OSes I became very comfortable with using the terminal on a daily basis for minor tasks to system configuration and diagnostics. I loved the power these tools have and wish to...
  8. non elevated powershell?

    in AntiVirus, Firewalls and System Security
    non elevated powershell?: Hi, I read that I can uninstall apps via the powershell elevated, and I indeed did this. But what surprised me was that even a non-elevated powershell prompt allowed me to uninstall a number of apps as well. Would this mean that I can even reinstall apps via a...
  9. Open Elevated Windows PowerShell in Windows 10

    in Windows 10 Tutorials
    Open Elevated Windows PowerShell in Windows 10: How to: Open Elevated Windows PowerShell in Windows 10 How to Open Elevated Windows PowerShell in Windows 10 [img] Information Windows 10 comes with Windows PowerShell 5.0 included. Windows PowerShell is a task-based command-line shell and scripting language...
  10. Processes with elevation terminated randomly?

    in Windows 10 Support
    Processes with elevation terminated randomly?: Lately, I've been experiencing a weird and new problem: Programs I run with elevation (i.e. as Administrator) have been randomly terminated. I'm not sure why this is happening. Is this a new Windows 10 security feature? Examples: I run Process Hacker with elevation to...