Как запустить windows terminal от имени администратора

В этом руководстве рассмотрим как открыть Терминал Windows от имени администратора в Windows 11.

Часто во многих руководствах для Windows 11  вам необходимо будет использовать терминал Windows от имени администратора, давайте рассмотрим как это сделать. 

В Windows 11 по умолчанию установлено новое приложение Windows Terminal. С его помощью  вы можете использовать PowerShell, WSL и Командную строку в разных вкладках одного окна консоли.

Как открыть терминал Windows от имени администратора.

С помощью меню «Пуск»

  1. Нажмите кнопку «Пуск», на панели задач.
  1. Кликните элемент «Все приложения».

Кликните элемент «Все приложения».

  1. Прокрутите список вниз и найдите приложение «Windows Terminal». Вы также можете найти приложение по буквам в Windows 11 с помощью алфавитной навигации.
  1. Кликните на нем правой кнопкой мыши, выберите в контекстном меню «Дополнительно» и кликните «Запуск от имени администратора».

Прокрутите список вниз и найдите запись «Windows Terminal», но не нажимайте на нее.

  1. Или, нажмите клавиши Ctrl Shift, а затем кликните приложение «Терминал Windows».

Как в Windows 11 открыть Терминал Windows от имени администратора

  1. Подтвердите запрос UAC. После чего будет запущен терминал Windows с повышенными правами.

С помощью поиска Windows 11

  1. Кликните значок поиска на панели задач или используйте сочетание клавиш Win S, чтобы открыть панель поиска.
  1. Введите: Terminal
  1. В результатах поиска кликните элемент со стрелкой вниз (см. картинку), чтобы просмотреть все доступные параметры.

С помощью поиска Windows 11

  1. Выберите из доступных вариантов «Запуск от имени администратора».

Открыть терминал Windows от имени администратора с панели задач

Если вы закрепили терминал Windows на панели задач вы в два клика сможете его открывать с повышенными правами.

Кликните приложение правой кнопкой мыши в открывшемся меню снова кликните «Windows Терминал» правой кнопкой мыши и выберите «Запуск от имени администратора».

Открыть терминал Windows от имени администратора с панели задач

Открыть терминал Windows от имени администратора с помощью окна «Выполнить»

  1. Откройте диалоговое окно «Выполнить».

Открыть терминал Windows с помощью окна «Выполнить»

  1. Введите в строку «Открыть»: wt.exe

Введите в текстовое поле «Выполнить»: wt.exe

  1. Нажмите сочетание клавиш Ctrl Shift Enter, подтвердите запрос UAC. После чего откроется терминал Windows с правами администратора.

Откройте Терминал Windows от имени администратора из диспетчера задач.

  1. Откройте приложение «Диспетчер задач».
  1. В меню выберите «Файл»  →  «Запустить новую задачу».

Откройте Терминал Windows  в Windows11 от имени администратора из диспетчера задач.

  1. В диалоговом окне «Выполнить новую задачу» наберите команду wt.
  1. Установите отметку для параметра «Создать эту задачу с правами администратора».

Wt.Exe из диспетчера задач от имени администратора.

  1. Нажмите кнопку «ОК» или клавишу Enter, чтобы открыть новый терминал Windows как администратор.

Открыть терминал Windows как администратор с помощью меню Win X

  1. Кликните правой кнопкой мыши кнопку «Пуск».
  1. В меню выберите Windows Terminal (Admin).

Открыть терминал Windows как администратор с помощью меню Win + X

  1. Подтвердите приглашение UAC.

Как всегда открывать Терминал Windows от имени администратора

Чтобы после запуска терминала все командные консоли выполняли команды с повышенными правами, выполните следующие действия:

Шаг 1: Откройте Терминал Windows.

Примечание: Параметр автоматического повышения уровня доступен в Windows Terminal версии 1.13 и выше. Чтобы проверить версию терминала, используйте команду «wt -v»

Чтобы проверить версию терминала, используйте команду «wt -v». 

Если вам нужно обновить приложение, используйте команду: winget upgrade —id Microsoft.WindowsTerminal.Preview 

Если у вас нет приложения, используйте команду для его установки: winget install —id Microsoft.WindowsTerminal.Preview

Если у вас нет приложения, используйте команду для его установки: winget install --id Microsoft.WindowsTerminal.Preview

Шаг 2: Нажмите кнопку меню рядом с параметром новой вкладки и выберите «Settings» (Параметры).

Шаг 3: В разделе «Профили» кликните раздел «Defaults» (По умолчанию).

Шаг 4: Передвиньте ползунок переключателя для «Run this profile as Administrator» (Запускать этот профиль от имени администратора) в положение «ON» (Вкл.), чтобы автоматически запускать командную строку, PowerShell и любой другой профиль от имени администратора.

Как всегда открывать Терминал Windows от имени администратора

Шаг 5: Нажмите кнопку «Сохранить».

После того, как вы выполните эти шаги, в следующий раз, когда вы откроете Терминал он откроется с повышенными правами, в том числе любой профиль: командная строка или PowerShell.

I use shortcut Windows Key +R to run Windows Terminal [wt], but I cannot run it as Admin, which causes problems when I install something via choco.

How do I open Windows Terminal as Admin via a command?

JW0914's user avatar

asked Jun 12, 2020 at 6:14

deuterium's user avatar

5

I found a nice workaround.
If you use Chocolatey to install «sudo» you can use sudo to activate any command as admin from inside The windows terminal. It will launch a separate window (either cmd or PowerShell) and provide a UAC prompt if enabled.

answered Jun 15, 2021 at 16:04

joshinator414's user avatar

1

A shell in Windows Terminal [wt] can be launched/relaunched as Admin in three ways:

  1. Pin Windows Terminal to the Taskbar → Shift + Right-click it → Run as Administrator
  2. Relaunch as Admin from within wt:
    # Cmd:
      Powershell -Command "Start-Process cmd -Verb RunAs"
    
    # Powershell:
      Start-Process -FilePath "powershell" -Verb RunAs
    
    # Pwsh:
      Start-Process -FilePath "pwsh" -Verb RunAs
    
    • These can be added as environment variables to PowerShell profiles [$Profile]:
      • %UserProfile%DocumentsWindows PowershellMicrosoft.PowerShell_profile.ps1
      • %UserProfile%DocumentsWindows Powershellprofile.ps1
  3. Add Relaunch-Admin function to profile, invoking with Relaunch-Admin or alias psadmin:
    # Function to relaunch as Admin:
      function Relaunch-Admin { Start-Process -Verb RunAs (Get-Process -Id $PID).Path }
    
    # Alias for the function:
      Set-Alias psadmin Relaunch-Admin
    

answered Jun 12, 2020 at 15:08

JW0914's user avatar

6

To start an executable as Admin from Run and Windows Menus, press CTRL+SHIFT+ENTER:

  • Run: WinKey+R
  • Windows Menus: Type the app’s name > Right-click it > Select Open file location:
    1. Right-click on shortcut > Select Properties
    2. Shortcut tab > Advanced > Advanced Properties > Select Run as administrator
      (The app will always start as Admin from now on)

Additional options to run an app as Administrator

JW0914's user avatar

answered Jun 12, 2020 at 9:46

user2380383's user avatar

user2380383user2380383

3271 silver badge10 bronze badges

7

You can create a shortcut to always run Windows Terminal as administrator using this powershell script:

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$HomeDesktopWindows Terminal.lnk")
$Shortcut.TargetPath = "$env:LOCALAPPDATAMicrosoftWindowsAppsMicrosoft.WindowsTerminal_8wekyb3d8bbwewt.exe"
$Shortcut.Save()

$bytes = [System.IO.File]::ReadAllBytes("$HomeDesktopWindows Terminal.lnk")
$bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
[System.IO.File]::WriteAllBytes("$HomeDesktopWindows Terminal.lnk", $bytes)

It basically creates a Windows Terminal.lnk file on your desktop, when you run it runs Windows Terminal as an administrator.

answered Oct 29, 2020 at 23:19

Vladimir Gonzalez's user avatar

4

In older versions of Windows, Run… created tasks with administrative privileges, but in Windows 10, it no longer does; however, you can do it using Task Manager:

  • CTRL+SHIFT+ESC > File Menu > New task > Create task with administrative privileges

JW0914's user avatar

answered Jun 12, 2020 at 9:16

Wasif's user avatar

WasifWasif

7,5932 gold badges15 silver badges32 bronze badges

4

In Windows 10 21H1, I have done the following:

  1. Go to C:Program FilesWindowsAppsMicrosoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe
  • note that you might need to change the Onwer for the WindowsApps folder from the folder Properties->Security->Advanced from SYSTEM to Adminstrators.
  • also note that the name of the WindowsTerminal folder might change, depending on the version you’re using.
  1. Find wt.exe and from it’s properties, in Compatibility, tick the box where it says «Run as administrator». You might have to «Change settings for all users.»
  2. Save.
  3. Create a shortcut of wt.exe & copy it in your C:Windows folder

Thsi is the only thing that worked for me AND you just need to Windows+R->wt->enter to open it as admin. No Shift key required.

Also note that applying these settings to «C:Users$env:usernameAppDataLocalMicrosoftWindowsAppswt.exe» won’t work.

It still opens as non-admin, from Run or Start.

There’s one thing that may or may not bug you about this. When you update Windows Terminal, the permissions of the wt.exe might break/revert to default, which means you’ll need to set them back as they were.

answered Jul 21, 2021 at 6:20

Mihai Andrei Iulian's user avatar

I know this is not directly related to the question, but I consider this a big improvement for people like me which needs to always run as an Administrator (please do not do it just for the sake of it, higher permissions can represent a security risk).

I always need to run PowerShell as Administrator and I only want to use Windows Terminal, which given it’s restrictions cannot be configured to run always as Administrator.

I hated the need to use shortcuts and other hacks I found being suggested online, so I think I found a better solution but you have to pay the cost of a 1/2 seconds at startup.

  1. Locate your user profile (A profile is a Windows PowerShell ISE script that runs automatically when you start a new session) using _ $PROFILE
  2. Edit profile with any preferred editor _ code $PROFILE
  3. Adde the following code to the profile file and save it
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    $host.ui.rawui.windowtitle="Bootstrapper"
    Start-Process -Verb RunAs wt
} else {
    $Processes = Get-Process | Where-Object {$_.mainWindowTitle -eq 'Bootstrapper' -and $_.name -eq 'WindowsTerminal'}
    if($Processes.count -gt 0)
    {
        Stop-Process -Id $Processes[0].id
    }
}

What the script do?
You can pin Windows Terminal icon to your application bar and when you click there WT will start as non elevated user, but the profile will understand if this is the case.
When you are not running as Administrator it will change the name of the window and start a new WT as administrator.
The new instance will also execute the profile file and if the instance is running as Administrator, it will look for the WT named Bootstrapper and kill it.
This process takes between one and two seconds, I prefer this way other than right clicking on the icon.

answered Feb 4, 2021 at 13:23

Norcino's user avatar

The approach closest, in spirit, to your original request would be to place Windows Terminal as a taskbar shortcut and use Ctrl+Shift+Win+#. The # pressed should be the actual number key on the number row that corresponds to taskbar position, 1 being the leftmost position and 0 being rightmost. This will launch a new instance of the application as admin, even if an existing instance is already open.

The only issue is I’m not sure if this works prior to Windows 10.

answered Oct 1, 2021 at 0:10

Curtis's user avatar

The easiest way I did it is to:

  1. Go to the folder that it is installed & copy all files and folder in that directory
  2. Create a folder on C: or anywhere you have Admin rights and name it whatever you’d like.
  3. Paste the contents
  4. Create a shortcut to run as Admin
  5. Pin To Taskbar

This way worked best for me because some reason I had permissions issues to it in the Program Files directory.

answered Jan 21, 2022 at 6:04

Tupac Shakur's user avatar

Add a shortcut to your taskbar then Ctrl+Shift click will open as Administrator

answered Mar 22, 2022 at 9:54

Ben Collins's user avatar

Like with cmd.exe or PowerShell, you often have to run Windows Terminal as admin to execute commands that need elevated privileges. In Windows Terminal, you can configure the elevation of privileges for an individual shell or for all shells. However, you have to expect some inconsistencies and peculiarities.

Contents

  1. Create an administrative profile
  2. Separate windows for admin shells
  3. Run all shells as admin
  4. Error when opening in an admin context
  5. Conclusion
  • Author
  • Recent Posts

Wolfgang Sommergut has over 20 years of experience in IT journalism. He has also worked as a system administrator and as a tech consultant. Today he runs the German publication WindowsPro.de.

Unlike the traditional console host, Windows Terminal runs the various command lines in tabs, with each shell configured through its own profile.

A profile’s settings also include the option to run the respective shell with elevated privileges. However, by default, Windows Terminal opens all predefined profiles in the context of the currently logged-in account.

Create an administrative profile

To configure a new shell for administrative purposes, you can use the function to duplicate existing profiles. To do so, open the settings and click Add a new profile.

Create a new administrative profile based on an existing one

Create a new administrative profile based on an existing one

In the following dialog box, select an existing profile that you want to copy, and execute the Duplicate command. Now the settings of this new profile open, and you can change its name and activate the Run this profile as Administrator option.

Name the cloned profile and configure it to run as admin

Name the cloned profile and configure it to run as admin

After being saved, this new profile appears immediately on the dropdown list and can be started directly. As expected, the following authentication expects you to enter the credentials of an administrative account.

The new administrative profile can be started from the list of all shells

The new administrative profile can be started from the list of all shells

Separate windows for admin shells

After you have successfully logged in, the command line does not open in a new tab but in a separate window. This is not entirely surprising, because the program in question is started as a child process of the terminal.

All administrative account profiles open in their own window

All administrative account profiles open in their own window

However, if you open another instance of the administrative shell, it does not appear as a tab in the existing admin terminal, but again in a separate window.

Run all shells as admin

If you want to use Windows Terminal only for administrative purposes, you can activate the Run this profile as Administrator option in the settings under Profiles > Defaults. This saves you the effort of launching the terminal as an administrator. Since the icon in the taskbar does not offer this option, you would have to use the search function as a workaround.

Run all shells as admin by configuring the default values

Run all shells as admin by configuring the default values

Another quirk of Windows Terminal is that it opens all shells with elevated privileges at the next startup if you have selected the admin option for the default profile. Usually, this is Windows PowerShell. You will then no longer be able to access the original user’s settings to undo this change (other than by editing the JSON file).

Error when opening in an admin context

Windows Terminal is a Store app, and as such, requires installation for each user. Depending on how the terminal was installed on your machine, running it as an administrator may fail if it doesn’t exist for the account in question.

If you download the program from the store, the store app sets up the Windows terminal for all users. If, on the other hand, you install it under a standard account via sideloading of the MSIX bundle, then it is missing in the profile of the administrative account and, accordingly, causes an error message if you try to start a profile with elevated rights.

If Windows Terminal was not installed for the admin the privileged shell will fail to run

If Windows Terminal was not installed for the admin the privileged shell will fail to run

In this case, the additional installation of Windows Terminal under the privileged user usually helps. However, with some previews of Windows 11, running a profile as admin may fail even then.

Conclusion

Executing command lines in tabs of a single terminal window is convenient, but it makes launching shells with elevated privileges more complicated. Windows Terminal provides a corresponding option for each individual profile or for all shells.

If you decide to configure individual profiles for elevating permissions, they always open a separate window, which actually contradicts the concept of the application.

Subscribe to 4sysops newsletter!

The questionable decision to implement Windows Terminal as a Store app has also proven to be an obstacle. Depending on how the tool was installed, the invocation as admin may fail.

avataravatar

В этой статье мы рассмотрим различные способы открыть Терминал Windows от администратора в Windows 11. Это даст вам возможность выполнять задачи обслуживания и администрирования, которые недоступны из обычного экземпляра приложения с правами по умолчанию.

Windows 11 включает в своём составе новое приложение Windows Terminal. Он объединяет PowerShell, WSL и классическую командную строку в одной стильной и настраиваемой консоли. Он поддерживает вкладки, поэтому вы можете работать одновременно с любой из доступных оболочек.

Терминал Windows легко настраивается. Он поддерживает профили, поэтому вы можете иметь настраиваемую оболочку, адаптированную для вашего личного рабочего процесса. В нем также есть множество горячих клавиш для экономии вашего времени, которые также можно изменить по вашему вкусу.

Помимо мощной функциональности, приложение имеет приятный внешний вид. Он поддерживает эмодзи, фоновые изображения (включая анимированные гифки) и поддерживает аппаратное ускорение рендеринга текста.

В этой статье мы рассмотрим различные способы открытия Терминала Windows от имени администратора.

Существует несколько способов открыть Терминал Windows от имени администратора в Windows 11. Мы рассмотрим несколько способов его запуска с повышенными правами. Вы можете использовать меню «Пуск», «Поиск», диалоговое окно «Выполнить», приложение «Диспетчер задач» и меню Win + X.

  1. Нажмите кнопку «Пуск», которая является крайним левым значком в центре панели задач.
  2. Щелкните элемент Все приложения.Windows 11 Меню Пуск - Все приложения
  3. Прокрутите список вниз и найдите запись Windows Terminal, но не нажимайте на нее.
  4. Нажмите и удерживайте клавиши Ctrl + Shift на клавиатуре, а затем щелкните Терминал Windows.открыть Терминал Windows от имени администратора в Windows 11
  5. Ещё, можно щелкнуть на нем правой кнопкой мыши и выбрать в контекстном меню «Дополнительно» > «Запуск от имени администратора».Правой кнопкой по Терминалу Windows в Пуске
  6. Подтвердите запрос Контроля учётной записи. У вас будет запущен терминал Windows с повышенными привилегиями.

Из поиска Windows

  1. Нажмите Win + S, чтобы открыть панель поиска, или щелкните значок поиска на панели задач.
  2. Начните печатать Terminal Windows.
  3. В результатах поиска нажмите на кнопку со стрелкой вниз, чтобы увидеть все доступные опции.Из поиска Windows
  4. Выберите Запуск от имени администратора.

Совет: Вы также можете сразу ввести фразу Terminal Windows в поле поиска меню «Пуск». Это также сработает, так как поиск интегрирован с меню Пуск.

Открыть терминал Windows из диалога «Выполнить»

  1. Нажмите клавиши Win + R, чтобы открыть диалог «Выполнить».
  2. Введите команду wt.exe в текстовое поле «Выполнить».
  3. Нажмите Ctrl + Shift + Enter и подтвердите запрос Контроля Учётный Записей (UAC).Windows Terminal As Administrator From Run
  4. После этого будет запущен терминал Windows с повышенными правами.

Запуск Windows Terminal от имени администратора в Диспетчере Задач

  1. Откройте приложение «Диспетчер задач», нажав сочетание клавиш Ctrl + Shift + Esc.
  2. В меню выберите Файл > Запустить новую задачу.Диспетчер задач - Запустить новую задачу
  3. Введите команду wt в диалоговом окне «Выполнить новую задачу».
  4. Теперь поставьте флажок Создать эту задачу с правами администратора.Запуск Windows Terminal от имени администратора в Диспетчере Задач
  5. Нажмите OK, чтобы открыть новый терминал Windows с повышенными правами.

  1. Нажмите Win + X или кликните правой кнопкой мыши кнопку «Пуск». Если у вашего компьютера есть сенсорный экран, вы можете нажать и удерживать кнопку «Пуск» пальцем, чтобы открыть это меню.
  2. В меню выберите Терминал Window (Администратор).из меню Win + X
  3. Подтвердите запрос UAC, и все готово.

В дополнение к контекстному меню кнопки «Пуск» вы также можете добавить аналогичную функцию и в Проводник. С помощью нескольких простых шагов вы можете получить доступ к пункту «Терминал Windows от имени администратора» в любой папке. Это позволит вам запустить терминал Windows с повышенными привилегиями прямо в текущей папке. Кроме того, он позволяет выбирать разные профили с помощью параметров каскадного меню в Windows 11.

  1. Загрузите Winaero Tweaker, установите и запустите.
  2. Найдите слева опцию Windows Terminal.
  3. Отметьте опцию Add Windows Terminal as administrator  cascading menu.Добавить Терминал Windows от Администратора в контекстное меню проводника
  4. Наконец, выберите нужные профили для отображения в меню.
  5. Щелкните правой кнопкой мыши любую папку в проводнике и выберите Показать дополнительные параметры.Терминал Windows от Администратора в контекстное меню
  6. Теперь выберите опцию Windows Terminal со значком щита.

Файлы реестра

Если вам не нравится идея использования программы Winaero Tweaker (или какой-либо другой программы), у меня есть готовые файлы реестра. Скачайте архив из статьи по ссылке, затем дважды щелкните на файле Add Open in Windows Terminal as administrator.reg, чтобы добавить его в реестр операционной системы.файлы реестра

Источник: Winaero

💡Узнавайте о новых статьях быстрее. Подпишитесь на наши каналы в Telegram и Twitter.

Судя по тому, что вы читаете этот текст, вы дочитали эту статью до конца. Если она вам понравилась, поделитесь, пожалуйста, с помощью кнопок ниже. Спасибо за вашу поддержку!

I use shortcut Windows Key +R to run Windows Terminal [wt], but I cannot run it as Admin, which causes problems when I install something via choco.

How do I open Windows Terminal as Admin via a command?

JW0914's user avatar

asked Jun 12, 2020 at 6:14

deuterium's user avatar

5

I found a nice workaround.
If you use Chocolatey to install «sudo» you can use sudo to activate any command as admin from inside The windows terminal. It will launch a separate window (either cmd or PowerShell) and provide a UAC prompt if enabled.

answered Jun 15, 2021 at 16:04

joshinator414's user avatar

1

A shell in Windows Terminal [wt] can be launched/relaunched as Admin in three ways:

  1. Pin Windows Terminal to the Taskbar → Shift + Right-click it → Run as Administrator
  2. Relaunch as Admin from within wt:
    # Cmd:
      Powershell -Command "Start-Process cmd -Verb RunAs"
    
    # Powershell:
      Start-Process -FilePath "powershell" -Verb RunAs
    
    # Pwsh:
      Start-Process -FilePath "pwsh" -Verb RunAs
    
    • These can be added as environment variables to PowerShell profiles [$Profile]:
      • %UserProfile%DocumentsWindows PowershellMicrosoft.PowerShell_profile.ps1
      • %UserProfile%DocumentsWindows Powershellprofile.ps1
  3. Add Relaunch-Admin function to profile, invoking with Relaunch-Admin or alias psadmin:
    # Function to relaunch as Admin:
      function Relaunch-Admin { Start-Process -Verb RunAs (Get-Process -Id $PID).Path }
    
    # Alias for the function:
      Set-Alias psadmin Relaunch-Admin
    

answered Jun 12, 2020 at 15:08

JW0914's user avatar

6

To start an executable as Admin from Run and Windows Menus, press CTRL+SHIFT+ENTER:

  • Run: WinKey+R
  • Windows Menus: Type the app’s name > Right-click it > Select Open file location:
    1. Right-click on shortcut > Select Properties
    2. Shortcut tab > Advanced > Advanced Properties > Select Run as administrator
      (The app will always start as Admin from now on)

Additional options to run an app as Administrator

JW0914's user avatar

answered Jun 12, 2020 at 9:46

user2380383's user avatar

user2380383user2380383

3271 silver badge10 bronze badges

7

You can create a shortcut to always run Windows Terminal as administrator using this powershell script:

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$HomeDesktopWindows Terminal.lnk")
$Shortcut.TargetPath = "$env:LOCALAPPDATAMicrosoftWindowsAppsMicrosoft.WindowsTerminal_8wekyb3d8bbwewt.exe"
$Shortcut.Save()

$bytes = [System.IO.File]::ReadAllBytes("$HomeDesktopWindows Terminal.lnk")
$bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
[System.IO.File]::WriteAllBytes("$HomeDesktopWindows Terminal.lnk", $bytes)

It basically creates a Windows Terminal.lnk file on your desktop, when you run it runs Windows Terminal as an administrator.

answered Oct 29, 2020 at 23:19

Vladimir Gonzalez's user avatar

4

In older versions of Windows, Run… created tasks with administrative privileges, but in Windows 10, it no longer does; however, you can do it using Task Manager:

  • CTRL+SHIFT+ESC > File Menu > New task > Create task with administrative privileges

JW0914's user avatar

answered Jun 12, 2020 at 9:16

Wasif's user avatar

WasifWasif

7,5932 gold badges15 silver badges32 bronze badges

4

In Windows 10 21H1, I have done the following:

  1. Go to C:Program FilesWindowsAppsMicrosoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe
  • note that you might need to change the Onwer for the WindowsApps folder from the folder Properties->Security->Advanced from SYSTEM to Adminstrators.
  • also note that the name of the WindowsTerminal folder might change, depending on the version you’re using.
  1. Find wt.exe and from it’s properties, in Compatibility, tick the box where it says «Run as administrator». You might have to «Change settings for all users.»
  2. Save.
  3. Create a shortcut of wt.exe & copy it in your C:Windows folder

Thsi is the only thing that worked for me AND you just need to Windows+R->wt->enter to open it as admin. No Shift key required.

Also note that applying these settings to «C:Users$env:usernameAppDataLocalMicrosoftWindowsAppswt.exe» won’t work.

It still opens as non-admin, from Run or Start.

There’s one thing that may or may not bug you about this. When you update Windows Terminal, the permissions of the wt.exe might break/revert to default, which means you’ll need to set them back as they were.

answered Jul 21, 2021 at 6:20

Mihai Andrei Iulian's user avatar

I know this is not directly related to the question, but I consider this a big improvement for people like me which needs to always run as an Administrator (please do not do it just for the sake of it, higher permissions can represent a security risk).

I always need to run PowerShell as Administrator and I only want to use Windows Terminal, which given it’s restrictions cannot be configured to run always as Administrator.

I hated the need to use shortcuts and other hacks I found being suggested online, so I think I found a better solution but you have to pay the cost of a 1/2 seconds at startup.

  1. Locate your user profile (A profile is a Windows PowerShell ISE script that runs automatically when you start a new session) using _ $PROFILE
  2. Edit profile with any preferred editor _ code $PROFILE
  3. Adde the following code to the profile file and save it
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    $host.ui.rawui.windowtitle="Bootstrapper"
    Start-Process -Verb RunAs wt
} else {
    $Processes = Get-Process | Where-Object {$_.mainWindowTitle -eq 'Bootstrapper' -and $_.name -eq 'WindowsTerminal'}
    if($Processes.count -gt 0)
    {
        Stop-Process -Id $Processes[0].id
    }
}

What the script do?
You can pin Windows Terminal icon to your application bar and when you click there WT will start as non elevated user, but the profile will understand if this is the case.
When you are not running as Administrator it will change the name of the window and start a new WT as administrator.
The new instance will also execute the profile file and if the instance is running as Administrator, it will look for the WT named Bootstrapper and kill it.
This process takes between one and two seconds, I prefer this way other than right clicking on the icon.

answered Feb 4, 2021 at 13:23

Norcino's user avatar

The approach closest, in spirit, to your original request would be to place Windows Terminal as a taskbar shortcut and use Ctrl+Shift+Win+#. The # pressed should be the actual number key on the number row that corresponds to taskbar position, 1 being the leftmost position and 0 being rightmost. This will launch a new instance of the application as admin, even if an existing instance is already open.

The only issue is I’m not sure if this works prior to Windows 10.

answered Oct 1, 2021 at 0:10

Curtis's user avatar

The easiest way I did it is to:

  1. Go to the folder that it is installed & copy all files and folder in that directory
  2. Create a folder on C: or anywhere you have Admin rights and name it whatever you’d like.
  3. Paste the contents
  4. Create a shortcut to run as Admin
  5. Pin To Taskbar

This way worked best for me because some reason I had permissions issues to it in the Program Files directory.

answered Jan 21, 2022 at 6:04

Tupac Shakur's user avatar

Add a shortcut to your taskbar then Ctrl+Shift click will open as Administrator

answered Mar 22, 2022 at 9:54

Ben Collins's user avatar

I use shortcut Windows Key +R to run Windows Terminal [wt], but I cannot run it as Admin, which causes problems when I install something via choco.

How do I open Windows Terminal as Admin via a command?

JW0914's user avatar

asked Jun 12, 2020 at 6:14

deuterium's user avatar

5

I found a nice workaround.
If you use Chocolatey to install «sudo» you can use sudo to activate any command as admin from inside The windows terminal. It will launch a separate window (either cmd or PowerShell) and provide a UAC prompt if enabled.

answered Jun 15, 2021 at 16:04

joshinator414's user avatar

1

A shell in Windows Terminal [wt] can be launched/relaunched as Admin in three ways:

  1. Pin Windows Terminal to the Taskbar → Shift + Right-click it → Run as Administrator
  2. Relaunch as Admin from within wt:
    # Cmd:
      Powershell -Command "Start-Process cmd -Verb RunAs"
    
    # Powershell:
      Start-Process -FilePath "powershell" -Verb RunAs
    
    # Pwsh:
      Start-Process -FilePath "pwsh" -Verb RunAs
    
    • These can be added as environment variables to PowerShell profiles [$Profile]:
      • %UserProfile%DocumentsWindows PowershellMicrosoft.PowerShell_profile.ps1
      • %UserProfile%DocumentsWindows Powershellprofile.ps1
  3. Add Relaunch-Admin function to profile, invoking with Relaunch-Admin or alias psadmin:
    # Function to relaunch as Admin:
      function Relaunch-Admin { Start-Process -Verb RunAs (Get-Process -Id $PID).Path }
    
    # Alias for the function:
      Set-Alias psadmin Relaunch-Admin
    

answered Jun 12, 2020 at 15:08

JW0914's user avatar

6

To start an executable as Admin from Run and Windows Menus, press CTRL+SHIFT+ENTER:

  • Run: WinKey+R
  • Windows Menus: Type the app’s name > Right-click it > Select Open file location:
    1. Right-click on shortcut > Select Properties
    2. Shortcut tab > Advanced > Advanced Properties > Select Run as administrator
      (The app will always start as Admin from now on)

Additional options to run an app as Administrator

JW0914's user avatar

answered Jun 12, 2020 at 9:46

user2380383's user avatar

user2380383user2380383

3271 silver badge10 bronze badges

7

You can create a shortcut to always run Windows Terminal as administrator using this powershell script:

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$HomeDesktopWindows Terminal.lnk")
$Shortcut.TargetPath = "$env:LOCALAPPDATAMicrosoftWindowsAppsMicrosoft.WindowsTerminal_8wekyb3d8bbwewt.exe"
$Shortcut.Save()

$bytes = [System.IO.File]::ReadAllBytes("$HomeDesktopWindows Terminal.lnk")
$bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
[System.IO.File]::WriteAllBytes("$HomeDesktopWindows Terminal.lnk", $bytes)

It basically creates a Windows Terminal.lnk file on your desktop, when you run it runs Windows Terminal as an administrator.

answered Oct 29, 2020 at 23:19

Vladimir Gonzalez's user avatar

4

In older versions of Windows, Run… created tasks with administrative privileges, but in Windows 10, it no longer does; however, you can do it using Task Manager:

  • CTRL+SHIFT+ESC > File Menu > New task > Create task with administrative privileges

JW0914's user avatar

answered Jun 12, 2020 at 9:16

Wasif's user avatar

WasifWasif

7,5932 gold badges15 silver badges32 bronze badges

4

In Windows 10 21H1, I have done the following:

  1. Go to C:Program FilesWindowsAppsMicrosoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe
  • note that you might need to change the Onwer for the WindowsApps folder from the folder Properties->Security->Advanced from SYSTEM to Adminstrators.
  • also note that the name of the WindowsTerminal folder might change, depending on the version you’re using.
  1. Find wt.exe and from it’s properties, in Compatibility, tick the box where it says «Run as administrator». You might have to «Change settings for all users.»
  2. Save.
  3. Create a shortcut of wt.exe & copy it in your C:Windows folder

Thsi is the only thing that worked for me AND you just need to Windows+R->wt->enter to open it as admin. No Shift key required.

Also note that applying these settings to «C:Users$env:usernameAppDataLocalMicrosoftWindowsAppswt.exe» won’t work.

It still opens as non-admin, from Run or Start.

There’s one thing that may or may not bug you about this. When you update Windows Terminal, the permissions of the wt.exe might break/revert to default, which means you’ll need to set them back as they were.

answered Jul 21, 2021 at 6:20

Mihai Andrei Iulian's user avatar

I know this is not directly related to the question, but I consider this a big improvement for people like me which needs to always run as an Administrator (please do not do it just for the sake of it, higher permissions can represent a security risk).

I always need to run PowerShell as Administrator and I only want to use Windows Terminal, which given it’s restrictions cannot be configured to run always as Administrator.

I hated the need to use shortcuts and other hacks I found being suggested online, so I think I found a better solution but you have to pay the cost of a 1/2 seconds at startup.

  1. Locate your user profile (A profile is a Windows PowerShell ISE script that runs automatically when you start a new session) using _ $PROFILE
  2. Edit profile with any preferred editor _ code $PROFILE
  3. Adde the following code to the profile file and save it
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    $host.ui.rawui.windowtitle="Bootstrapper"
    Start-Process -Verb RunAs wt
} else {
    $Processes = Get-Process | Where-Object {$_.mainWindowTitle -eq 'Bootstrapper' -and $_.name -eq 'WindowsTerminal'}
    if($Processes.count -gt 0)
    {
        Stop-Process -Id $Processes[0].id
    }
}

What the script do?
You can pin Windows Terminal icon to your application bar and when you click there WT will start as non elevated user, but the profile will understand if this is the case.
When you are not running as Administrator it will change the name of the window and start a new WT as administrator.
The new instance will also execute the profile file and if the instance is running as Administrator, it will look for the WT named Bootstrapper and kill it.
This process takes between one and two seconds, I prefer this way other than right clicking on the icon.

answered Feb 4, 2021 at 13:23

Norcino's user avatar

The approach closest, in spirit, to your original request would be to place Windows Terminal as a taskbar shortcut and use Ctrl+Shift+Win+#. The # pressed should be the actual number key on the number row that corresponds to taskbar position, 1 being the leftmost position and 0 being rightmost. This will launch a new instance of the application as admin, even if an existing instance is already open.

The only issue is I’m not sure if this works prior to Windows 10.

answered Oct 1, 2021 at 0:10

Curtis's user avatar

The easiest way I did it is to:

  1. Go to the folder that it is installed & copy all files and folder in that directory
  2. Create a folder on C: or anywhere you have Admin rights and name it whatever you’d like.
  3. Paste the contents
  4. Create a shortcut to run as Admin
  5. Pin To Taskbar

This way worked best for me because some reason I had permissions issues to it in the Program Files directory.

answered Jan 21, 2022 at 6:04

Tupac Shakur's user avatar

Add a shortcut to your taskbar then Ctrl+Shift click will open as Administrator

answered Mar 22, 2022 at 9:54

Ben Collins's user avatar

В Windows 11, вместо командной строки по умолчанию, идет встроенный терминал Windows, который стал единой заменой PowerShell и CMD. Терминал Windows — это одно окно, которое включает в себя CMD, PowerShell и AzureCloudShell, что обеспечивает юзабилити при вводе команд и апплетов.

В первую очередь вы должны знать, что запуская терминал Windows от имени администратора и открывая рядом окно командной строки или PoweShell, то они тоже открываются с повышенными правами.

Кроме того, открывая Terminal через контекстное меню в Windows 11, он откроется по текущему пути и без прав администратора. К примеру, вы нажали ПКМ на рабочем столе и запустили Терминал и он запуститься с текущего пути C:UsersmyWEBpcDesktop.

Чтобы быстро отрыть Терминал, CMD, PowerShell и Azure Cloud от имени администратора, отройте Terminal и нажмите:

  • Ctrl+Shift+1: запустить PowerShell с повышенными правами.
  • Ctrl+Shift+2: запустить командную строку с повышенным правами.
  • Ctrl+Shift+3: запустить Azure Cloud с повышенным правами.

Из меню Win+X

  • Нажмите сочетание клавиш на клавиатуре Win+X и выберите Терминал Windows (Администратора).
    запуск терминала от имени админа в Windows 11

Через поиск меню пуска

  • Откройте меню пуск в Windows 11 и напишите в поиске «terminal«, после чего нажмите правой кнопкой мыши и выберите запуск от имени администратора.запуск терминала от имени админа windows11 через поиск

При помощи «Выполнить»

  1. Нажмите на клавиатуре Win+R и напишите wt.exe.
  2. Далее зажмите Ctrl+Shift+Enter, что запустит терминал от имени админа.запуск терминала от имени админа Win+R wt.exe

Через диспетчер задач

  1. Нажмите Ctrl+Shift+Esc, чтобы открыть диспетчер задач.
  2. Нажмите на вкладку «Файл» > «Запустить новую задачу«.
  3. Напишите в окне wt.exe.
  4. Установите галочку «Создать задачу с правами админа«.
  5. Нажмите OK.запуск терминала с повышенными права через диспетчер задач

Примечание: Если вам нужно запустить командную строку от имени администратора в терминале, то нажмите на ярлычок и выберите «Командная строка«.запуск терминала и CMD от имени админа windows11

Совет: Если вы хотите, чтобы при запуске терминала отрывалась командная строка, а не PowerShell, то нажмите «Параметры» и выберите по умолчанию CMD.при запуске терминала отрывалась командная строка, а не PowerShell


Смотрите еще:

  • Появляется командная строка (CMD) и исчезает при запуске Windows 10
  • Как отключить доступ к командной строке (CMD) в Windows 10
  • Как установить MySQL в Windows 10 при помощи CMD (winget)
  • CMD: Недостаточно ресурсов памяти для обработки этой команды
  • PowerShell: Выполнение сценариев отключено в этой системе

[ Telegram | Поддержать ]

Download PC Repair Tool to quickly find & fix Windows errors automatically

If you are using Windows 11 and want to open Windows Terminal as administrator, here is how you can do that. Here are four different methods to run or open Windows Terminal as an administrator in Windows 11.

How to open Windows Terminal as administrator in Windows 11

In Windows 10, Windows Terminal was an optional app that users could download from Microsoft Store. However, it comes as a pre-installed app in Windows 11. By default, if you try to open it from Start Menu or context menu, you would open it without administrator privilege. However, there could be times when you want to open this app with administrator permission.

How do I run Windows Terminal as administrator?

You can open and run Windows Terminal as an administrator using four different methods: Start Menu, Win+X menu, Task Manager, and context menu. However, if you want to open it quickly, the Win+X menu method seems handy since you have to press Win+X to find the option you are looking for.

To open Windows Terminal as an administrator in Windows 11, follow these steps:

  1. From Win+X menu
  2. From Start Menu/Taskbar search box
  3. From Task Manager
  4. Add context menu option

To learn more about these steps, continue reading.

1] From Win+X menu

How to open Windows Terminal as administrator in Windows 11

Microsoft introduced Win+X menu a long time back in Windows 8. This additional menu includes several options and apps that you can open on your computer. Earlier, it was possible to open Command Prompt or Windows PowerShell with and without administrator permission. However, now you can open Windows Terminal from the Win+X menu with and without administrator privilege. For that, press Win+X and select the Windows Terminal (Admin) option.

Then, you can select the Yes option in the UAC prompt.

2] From Start Menu/Taskbar search box

How to open Windows Terminal as administrator in Windows 11

It is yet another simple method that you can use to open Windows Terminal as an administrator in Windows 11. You can use Start Menu to find out the app and the Taskbar search box to do the same. If you click on the Start Menu, it displays a list of apps on your screen. Then, click on the All apps button to find out all the installed apps.

From here, find out the Windows Terminal, right-click on it, and select the Run as administrator option.

As you are opening this app as an administrator, you have to click on the Yes option in the UAC prompt.

Alternatively, you can use the Taskbar search box to find out Windows Terminal, right-click on it and select the Run as administrator option.

As usual, click the Yes option.

Read: What is Windows PowerShell, PowerShell, Azure Cloud Shell, Command Prompt in Windows Terminal.

3] From Task Manager

How to open Windows Terminal as administrator in Windows 11

Task Manager allows users to open any app with administrator permission. In Windows 11, there is no change in that functionality. Therefore, follow these steps to open Windows Terminal as administrator using Task Manager:

  • Press Win+X to open the menu and select Task Manager.
  • Click on File > Run new task.
  • Type wt.exe and tick the Create this task with administrator privilege checkbox.
  • Click the OK button.

4] Add context menu option

It is possible to use the Registry Editor to add the context menu option to open Windows Terminal as administrator. However, the only problem with this method is that you have to click on the Show more options in the original right-click context menu to find out this option.

Here is the detailed guide you can follow to add and open Windows Terminal with administrator privilege from the context menu.

How do I open PowerShell and Command Prompt as administrator in Terminal?

You can follow the same method to open PowerShell and Command Prompt as administrator. When you follow the aforementioned methods, Windows Terminal opens the default startup profile. However, if you change the default startup profile in Windows Terminal, it will open PowerShell or Command Prompt as administrator in Terminal.

That’s all! These are some of the methods to open Windows Terminal as administrator on Windows 11.

Ezoic

Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP (2006-16) & a Windows Insider MVP (2016-2022). Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

ТерминалСегодняшняя заметка будет относится к справочным материалам. Самые нужные команды для CMD/командной строки (терминала) можете почерпнуть тут. 

*

Всем доброго времени суток!

В «новую» ОС Windows 11 вместо командной строки (CMD) по умолчанию в меню был встроен терминал (Terminal). Представляет он из себя полноценную замену сразу для PowerShell, CMD и AzureCloudShell (3 в 1!) — что, кстати, весьма удобно при использовании команд и апплетов.

📌Чтобы его запустить — в большинстве случаев достаточно кликнуть правой кнопкой мыши по меню ПУСК. Однако, в последних версиях Windows 11 с этим иногда возникла «проблема» (панель задач с ПУСК’ом пропадали / либо подвисали). Собственно, это и побудило создать небольшую заметку с неск. способами запуска терминала.

Итак…

*

Содержание статьи

    ускорение ПК

  • 1 Запуск терминала (в т.ч. под админом)
    • 1.1 Вариант 1
    • 1.2 Вариант 2
    • 1.3 Вариант 3
    • 1.4 Вариант 4
    • 1.5 📌 Что насчет Power Shell
    • 1.6 📌Автозагрузка терминала (вместе с Windows)
  •  → Задать вопрос | дополнить 

Запуск терминала (в т.ч. под админом)

Вариант 1

Самый универсальный (и «живучий» судя по всему) способ запустить терминал:

  1. воспользоваться сочетанием клавиш Ctrl+Alt+Del и вызвать диспетчер задач;
  2. нажать по меню «Файл / новая задача»;
  3. в строку «Открыть» ввести wt.exe и поставить галочку, что задача нужна с правами администратора. См. пример ниже; 👇
  4. нажать OK. Терминал должен открыться…

wt.exe — диспетчер задач — запуск терминала в Windows 11

wt.exe — диспетчер задач — запуск терминала в Windows 11

Терминал открыт...

Терминал открыт…

*

Вариант 2

Если проводник у вас корректно работает — попробуйте на рабочем столе нажать сочетание клавиш: Win+X. Если все «OK» — должно появиться окно со ссылкой на терминал, см. скриншот ниже (в т.ч. можно запустить и под администратором 👌).

Сочетание Win+X

Сочетание Win+X

Кроме этого, можно нажать ПКМ по свободному месту рабочего стола или на каком-нибудь каталоге — а во всплывшем контекстном меню выбрать «Open in Windows Terminal». 👇

Правый клик мышки по папке (рабочему столу)

Правый клик мышки по папке (рабочему столу)

*

Вариант 3

Если у вас на панели задач есть значок поиска — просто наберите в строке «Terminal» — Windows сама найдет его и предложит открыть. См. пример ниже. 👇

Поиск — terminal — открыть

Поиск — terminal — открыть

*

Вариант 4

Если предыдущие варианты не увенчались успехом — возможно в вашей версии терминал не установлен (хотя, такого сейчас не должно быть…).

В общем, рекомендую попробовать 📌открыть Microsoft Store (в меню ПУСК должен быть ярлык…) и найти в магазине терминал (см. пример ниже). Также 📌ссылка в помощь.

Если у вас терминал установлен — просто нажмите по кнопке «Open» (в переводе «Открыть»), в противном случае — сначала инсталлируйте его («Install»…).

Microsoft Store — Windows Terminal — Open — Windows 11

Microsoft Store — Windows Terminal — Open — Windows 11

*

📌 Что насчет Power Shell

Если у вас открыт терминал — то прямо из него можно запустить Windpws Power Shell. Для этого просто нажмите по «стрелочке» в верхней строке и выберите соотв. опцию в меню (либо нажмите сочетание Ctrl+Shift+1).

См. скрин ниже. 👇

img-Kak-iz-terminala-otkryit-Windows-Power-Shell.jpg

Скриншот. Как из терминала открыть Windows Power Shell

*

📌Автозагрузка терминала (вместе с Windows)

Терминал (да и командную строку) можно «заставить» открываться сразу после запуска Windows — вместе с появл. рабочего стола… В определенных случаях —такой подход весьма удобен!

Как это сделать:

  1. открыть терминал (выше предложено 4 варианта);
  2. в верхнем меню кликнуть по «стрелочке» и выбрать меню «Settings»;
  3. в разделе «Startup» включить опцию «Launch on machine startup» и сохранить настройки. См. скрины ниже. 👇

Settings — терминал Windows 11

Settings — терминал Windows 11

Startup - Settings - Windows 11

Startup — Settings — Windows 11

*

Иные способы приветствуются в комментариях!

Успехов!

👋

donate

dzen-ya

Полезный софт:

  • видеомонтаж
  • Видео-Монтаж
  • Отличное ПО для создания своих первых видеороликов (все действия идут по шагам!).
    Видео сделает даже новичок!

  • утилита для оптимизации
  • Ускоритель компьютера
  • Программа для очистки Windows от «мусора» (удаляет временные файлы, ускоряет систему, оптимизирует реестр).

Понравилась статья? Поделить с друзьями:
  • Как запустить warface на windows 7
  • Как запустить windows server на virtualbox
  • Как запустить syndicate 2012 на windows 10
  • Как запустить warcraft 3 frozen throne на windows 10
  • Как запустить syberia на windows 10