Как запустить powershell от имени администратора в windows 10 через командную

Whether you’re just starting out with PowerShell or you already know how to run commands, there are times when you must use PowerShell to ‘run as administrator’ Why? Because sometimes, any activity you do inside of PowerShell will require elevated privileges.

In this tutorial, you’re going to learn just about every way possible to run PowerShell as administrator from the perspective of an end-user, a command-line junkie, or an IT admin!

This tutorial has many sections each showcasing how to run PowerShell as administrator. Feel free to click on whichever method you prefer in the Table of Contents.

Prerequisites

This article will be a hands-on tutorial. If you’d like to follow along, please be sure you have:

  • A Windows 10 PC – Although Windows 10 was used as an example for this article, most of the methods provided will work with Windows 7+.
  • An account with administrator privileges. If you don’t already have one, learn how to create one here.
  • PowerShell – Most of these methods will work with Windows PowerShell 5.1 or PowerShell 7.

Running PowerShell as Administrator with a Right-Click

One of the simplest ways to run PowerShell as administrator is with a right-click. There are a few different areas where you can right click on PowerShell and run it. Let’s run through them.

Using the Search Bar

The Search Bar is practically one of the easiest ways to run most of the programs installed on your computer. It’s also an easy way to run any program as administrator, including PowerShell.

To run PowerShell, specifically, as administrator from the search bar:

  1. Click on the search box at the taskbar and type powershell. This action will bring up the PowerShell edition of your preference.
  2. Look for Windows PowerShell or just PowerShell, if using PowerShell Core, from the search result.
  3. Right-click on the menu item and select Run as administrator.

You can see these steps demonstrated in the screenshot below.

Runnning PowerShell Using the Search Bar

Runnning PowerShell Using the Search Bar

If you pin a program to the start menu or taskbar, you can also right-click on the menu item there as well. With this method, Windows 10 creates a shortcut for PowerShell that is more accessible to you at the start menu or the taskbar.

To run PowerShell as administrator on a pinned item:

  1. Find the PowerShell icon in the search box again.
  2. Right-click on the PowerShell icon and select Pin to Start or Pin to Taskbar.
Pinning PowerShell to Start Menu or Taskbar

Pinning PowerShell to Start Menu or Taskbar
  1. Click on the Start button
  2. Look for Windows PowerShell (or PowerShell Core) on the right side of the Start Menu.
  3. Right-click on the menu item and choose Run as administrator.
Running PowerShell From The Start Menu

Running PowerShell From The Start Menu

Running PowerShell as Administrator Using File Explorer

Are you in Windows’ File Explorer, you can fire up PowerShell as administrator there too!

  1. Open up File Explorer by using Win Key + E shortcut keys or by simply clicking the icon at the taskbar as you can see on the screenshot below.
Open File Explorer From The Taskbar

Open File Explorer From The Taskbar

2. Once in File Explorer, click on File → Open Windows PowerShell → Open Windows PowerShell as administrator as shown below.

Run PowerShell From File Menu in File Explorer

Run PowerShell From File Menu in File Explorer

Using the PowerShell Executable

Whether you’re using a 32-bit or 64-bit operating system, you can run PowerShell as administrator from its respective location.

  1. In File Explorer, navigate to one of the folders below.
    • For 32-bit OS: C:\Windows\System32\WindowsPowerShell\v1.0
    • For 64-bit OS: C:\Windows\SysWOW64\WindowsPowerShell\v1.0
  2. Find the powershell.exe file.
  3. Right-click on powershel.exe and select Run as Adminstrator.
Run PowerShell as Administrator From a Folder

Run PowerShell as Administrator From a Folder

Creating a Shortcut for PowerShell on the Desktop

If you’d like an easy way to invoke PowerShell, you can also create a Windows shortcut for it.

  1. Once you’ve got the Create Shortcut process started, provide the path to the PowerShell executable. For Windows PowerShell, that path is:
  • For 32-bit OS: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
  • For 64-bit OS: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Proceed Creating The Shortcut

Proceed Creating The Shortcut

2. Provide the shortcut a handy name (PowerShell Admin for example).

Name The Shortcut For PowerShell

Name The Shortcut For PowerShell

3. Find the shortcut you just created and right-click on it and choose Properties as shown below.

Accessing PowerShell's Shortcut Properties

Accessing PowerShell’s Shortcut Properties

4. Click on Shortcut tab and then on the Advanced button and the Advanced Properties window will pop-up.

PowerShell’s Shortcut Properties

5. In the Advanced Properties window, select the Run as administrator checkbox and click OK.

Set PowerShell to Run as Administrator

6. Back to the Shortcut Properties, click OK to apply the changes and you’re all set.

Another way to easily access PowerShell is via the Win-X menu as shown in the following screenshot. This menu was never given an official name but was widely referred to as Win-X (or power user menu) as the shortcut to access it is Win Key + X.

Once the menu is up, simply click on Windows PowerShell (Admin) and you’re off to th races.

Running PowerShell via WinX Menu

Running PowerShell via WinX Menu

Using the Run Command Window

The Run Command Window is a powerful tool that lets you run programs without searching for them using the SearchBar, Start Menu or File Explorer. To run PowerShell as administrator via the Run command window:

  1. Press Win Key + R. A a small window will pop up as shown in the screenshot below.
  2. Type in powershell and press Ctrl+Shift+Enter or press and hold Ctrl+Shift.
  3. Click OK to make PowerShell run as administrator.
Run Command Window

You’re now running PowerShell as administrator.

Using Task Manager

Task Manager is a tool that lets you monitor or end a process of the programs and services that are currently running on your computer. You can also use it to execute a task such as running PowerShell as administrator manually.

To run PowerShell as administrator via the task manager:

  1. Open the Task Manager by pressing Ctrl+Shift+Esc keys on your keyboard or as you see in the screenshot below

You can alternatively right-click on the Task Bar and select Task Manager to bring up Task Manager.

Run Task Manager

2. Once Task Manager opens, go up to File and click on Run new task as shown below.

Run New Task in Task Manager

Run New Task in Task Manager

3. You should then see a window pop up that looks similar to the Run window described earlier.

4. Type in powershell ensuring you also check the Create this task with administrative privileges checkbox and click OK to make PowerShell run as administrator.

Running PowerShell as Administrator with the Command Line

If you regularly find yourself on the command line, don’t fret, you can run PowerShell as administrator there too!

If you already have cmd. exe open running as adminstrator using the same techniques described in this article, you can simply run start powershell and it will be running as adminstrator.

If you’re running a command prompt not as administrator yet, that’s not a problem. Invoke the Start-Process cmdlet with PowerShell from cmd. exe using the -Verb runas parameter.

powershell Start-Process powershell -Verb runAs

If you’re already in a PowerShell window, you can run Start-Process powershell -Verb runas directly to open a new PowerShell instance running as administrator

Creating a Batch File to Run PowerShell as Administrator

So you now know how to invoke PowerShell as administrator from a command prompt. If you already know how to do that, you can create a batch file to automate it!

Open up your favorite text editor, paste in the following line and save the file as PowerShell as admin.bat anywhere you’d like.

Powershell.exe -Command "& {Start-Process Powershell.exe -Verb RunAs}"

Run the batch file and you’ll notice up comes a PowerShell window running as administrator!

Creating a Scheduled Task to Run PowerShell as Administrator

Task Scheduler is a built-in app on Windows 10 that lets you virtually run automated tasks. Hence, you can also use it to create a task that runs PowerShell as administrator each time you logon to your computer, for example.

Start up the Create Taskbox and specify the file to run as one of the below:

  • For 32-bit OS: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • For 64-bit OS: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe

In the Create Task windows, provide the values to all of the menu items shown below ensuring the Run with highest privileges checkbox is checked.

Enable Run with Highest Privileges Option

Enable Run with Highest Privileges Option

Now when the scheduled task is invoked, it will execute PowerShell as administrator!

Further Reading

  • PowerShell Objects, Properties and Methods
  • How to Set Up and Manage Scheduled Tasks with PowerShell

run powershell as administrator

Like Command Prompt, Windows PowerShell is a command-line window designed in Windows, which is generally for system advanced administration, IT professionals and developers. Actually, Windows PowerShell is more powerful but less known than Command Prompt. In our previous post, we showed how to open Command Prompt as an administrator in Windows 10. Now in this post, we will show five ways to run PowerShell as an administrator in Windows 10.

  • Way 1: from start menu
  • Way 2: from Win + X menu
  • Way 3: from the command prompt
  • Way 4: from File Explorer
  • Way 5: from task manager
  • Way 6: from the Run dialog

Way 1: Run PowerShell as administrator from Start menu search box

Step 1: Bring up the Windows 10 Start menu.

Step 2: Type powershell. In the search result, right click on the Windows PowerShell app and select Run as administrator.

Way 2: Run PowerShell as admin from Win + X menu

Either Command Prompt or Windows PowerShell has usually included in Win + X menu.

Press Win + X keyboard shortcut to bring up Win + X menu. Then from the menu click Windows PowerShell (Admin).

Way 3: Run PowerShell as administrator from an elevated CMD

Step 1: Open Windows 10 Command Prompt as administrator.

Step 2: Type powershell and hit Enter. Then the command prompt will turn to Windows PowerShell.

Run powershell from command prompt

Way 4: Run PowerShell as administrator from File Explorer

Step 1: Open File Explorer in Windows 10.

Step 2: Navigate to C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe. Then right-click on the powershell.exe file and select Run as administrator.

Right-click on powershell.exe

Way 5: Run PowerShell as administrator from Task Manager

Step 1: Open Windows 10 task manager.

Step 2: Click on More details in the lower left corner to display the full screen of task manager.

Step 3: Click File > Run new task.

Step 4: In the Create new task dialog box, type powershell, check the box next to Create this task with administrative privileges and then click OK.

Create powershell task

Step 1: Bring up Run dialog box by pressing Win + R keys.

Step 2: Type powershell in the box and click OK.

Step 3: A normal Windows PowerShell will open as your current user. Type start –process powershell –verb runAs and hit “Enter” key. This will bring up an elevated PowerShell as an administrator.

Start administrative powershell

PowerShell is specially designed for IT professionals and system administrators to control & automate the administration of Windows OS and other applications. It provides new concepts to extend the knowledge you have gained and scripts created within the Windows Command Prompt and Windows Script Host environments.

Using PowerShell, you can perform various administrative tasks on your Windows 10 PC. For instance, we have used this utility to determine the serial number of HDD and SSD, determine device driver versions, open the Settings app, obtain the PC’s model number, etc.

What is PowerShell?

According to Microsoft, “PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework. PowerShell runs on Windows, Linux, and macOS.

PowerShell is a modern command shell that combines the best features of other popular shells. Unlike most shells that only accept and return text, PowerShell accepts and returns .NET objects also. The shell includes the following features:-

  • Robust command-line history
  • Tab completion and command prediction
  • Supports command and parameter aliases
  • Pipeline for chaining commands
  • The in-console help system, similar to Unix manpages

As you can see above, various tasks can be performed using Windows PowerShell. This post will see the different ways to open PowerShell as an Administrator in Windows 10. These are the following:-

  1. Open or run PowerShell as Administrator using the Run Dialog box.
  2. Launch PowerShell as Administrator from Command Prompt or WinX Menu.
  3. Start PowerShell as Administrator from Windows Task Manager.
  4. Begin PowerShell as Administrator from Start Menu.

How to open or run PowerShell as Administrator using the Run Command box?

To open or run the Windows PowerShell as administrator on Windows using the Run dialog box, perform the following steps:-

Step 1. Press the Windows + R shortcut keys together on the keyboard to open the Run box.

Step 2. In the Run dialog box that opens, type the following and hit Enter from the keyboard:-

Powershell

Step 3. You will notice that the Windows PowerShell window has opened with current user rights. To switch it with administrator rights, copy and paste the following command and hit Enter from the keyboard:-

Start-Process powershell -Verb runAs

If User Account Control appears, click the Yes button.

Step 4. Now another Windows PowerShell window will open with administrative rights.

Alternatively, open the Run dialog box by pressing the Windows logo + R keys together. Type PowerShell and press Ctrl + Shift + Enter shortcut keys from the keyboard to launch the Windows PowerShell with elevated rights.

How to launch PowerShell as Administrator from Command Prompt or WinX Menu?

To open the PowerShell as Administrator from Command Prompt, do the following steps:-

Step 1. Open the Command Prompt with administrative rights.

Step 2. In the elevated Command Prompt, type the following and hit Enter from the keyboard to launch the PowerShell with elevated right:-

PowerShell

Note: If you are using the latest update of Windows 10, it may not work.

In Windows 10 Creators Update, Microsoft has added PowerShell to the WinX menu. Press the Windows logo + X keys simultaneously on the keyboard or right-click on the Start Menu to open the WinX menu. Click on “Windows PowerShell (Admin)” to open the Windows PowerShell with elevated rights.

How to start or open PowerShell as Administrator from Windows 10 Task Manager?

Windows 10 Task Manager can be used to open or launch PowerShell as Administrator. Earlier in Gear Up Windows, we had seen the steps to run File Explorer with Admin Rights using Task Manager in Windows 10.

To launch the PowerShell as Administrator from Windows 10 Task Manager, perform the following steps:-

Step 1. Launch the Task Manager by pressing Ctrl + Shift + Esc simultaneously from the keyboard. By default, Windows 10 Task Manager opens with fewer details. Click More Details to expand it.

Step 2. Click on the File menu and choose here Run new task option.

Step 3. A new dialog box opens “Create new task.”

Step 4. Type powershell in the box, and don’t forget to check the checkbox “Create this task with administrative privileges.”

Step 5. Finally, click the OK button to open the PowerShell with elevated rights.

How to open or begin PowerShell as Administrator from Start Menu?

This is the easiest method to open PowerShell as an Administrator. To run the PowerShell as Administrator, perform the following steps:-

Step 1. Click on the Start button/menu of Windows 10 and type PowerShell.

Step 2. On the top search result, right-click on the Windows PowerShell entry and select “Run as administrator.”

Once you complete the above steps, PowerShell will open with administrator or full rights.

Conclusion

In conclusion, PowerShell is a powerful automation tool designed for IT professionals and system administrators to manage and automate the administration of Windows OS and other applications. It is a modern command shell that combines the best features of other popular shells and accepts and returns .NET objects. With PowerShell, various administrative tasks can be performed, such as determining device driver versions, obtaining the PC’s model number, and opening the Settings app. This post discussed different ways to open PowerShell as an administrator in Windows 10, including using the Run Dialog box, Command Prompt or WinX Menu, Windows Task Manager, and Start Menu. By following these steps, users can launch PowerShell with elevated rights and perform tasks that require administrator privileges.

Многие инструкции на этом сайте в качестве одного из первых шагов предлагают запустить PowerShell, обычно от имени администратора. Иногда в комментариях появляется от начинающих пользователей вопрос о том, как это сделать.

В этом руководстве подробно о способах открыть PowerShell, в том числе от администратора, в Windows 10, 8 и Windows 7, а также видео инструкция, где все эти способы показаны наглядно. Также может быть полезно: Способы открыть командную строку от имени администратора.

Запуск Windows PowerShell с помощью поиска

Моя первая рекомендация на тему запуска любой утилиты Windows, которую вы не знаете, как запустить — использовать поиск, он поможет почти всегда.

Кнопка поиска есть на панели задач Windows 10, в Windows 8 и 8.1 поле поиска можно открыть клавишами Win+S, а в Windows 7 найти в меню «Пуск». Шаги (на примере 10-ки) будут следующими.

  1. В поиск начните вводить PowerShell, пока не покажется необходимый результат. 
  2. Если требуется запуск от имени администратора, нажмите по Windows PowerShell правой кнопкой мыши и выберите соответствующий пункт контекстного меню. 

Как видите, очень просто и подходит для любой из последних версий Windows.

Как открыть PowerShell через контекстное меню кнопки «Пуск» в Windows 10

Если на вашем компьютере установлена Windows 10, то, пожалуй, ещё более быстрый способ открыть PowerShell — нажать правой кнопкой мыши по кнопке «Пуск» и выбрать нужный пункт меню (там присутствует сразу два пункта — для простого запуска и от имени администратора). Это же меню можно вызвать, нажав клавиши Win+X на клавиатуре.

Примечание: если в этом меню вместо Windows PowerShell у вас отображается командная строка, то заменить её на PowerShell вы, при желании, можете в Параметры — Персонализация — Панель задач, включив пункт «Заменить командную строку оболочкой Windows Powershell» (в последних версиях Windows 10 параметр включен по умолчанию).

Запуск PowerShell с помощью диалогового окна «Выполнить»

Еще один простой способ запуска PowerShell — использовать окно «Выполнить»:

  1. Нажмите клавиши Win+R на клавиатуре.
  2. Введите powershell и нажмите Enter или Ок.

При этом в Windows 7 можно установить отметку запуска от имени администратора, а в последней версии Windows 10, если при нажатии Enter или Ok удерживать клавиши Ctrl + Shift, то утилита также запуститься от имени администратора.

Видео инструкция

Другие способы открыть PowerShell

Выше перечислены далеко не все способы открытия Windows PowerShell, но, уверен, что их будет вполне достаточно. Если же нет, то:

Также, бывает, спрашивают, а что такое PowerShell ISE и PowerShell x86, которые находятся, например, при использовании первого способа. Отвечаю: PowerShell ISE — «Интегрированная среда сценариев PowerShell». По сути, с её помощью можно выполнять все те же команды, но, помимо этого, в ней присутствуют дополнительные возможности, облегчающие работу со скриптами PowerShell (справка, инструменты отладки, цветовая разметка, дополнительные горячие клавиши и т.п.). В свою очередь версии x86 нужны в случае, если вы работаете с 32-битными объектами или с удаленной системой x86.

 
Many users are aware of the Command Prompt whereas a very small number of people know about Windows PowerShell. Instead of Command Prompt, you can work with Windows PowerShell which provides your more power and authority over your Windows 10 computer. Hence, in this article, we are here with tips for different ways to Run PowerShell as administrator in Windows 10 operating system as administrator.

Microsoft has originated shell called Windows PowerShell in order to handle configuration and carry out task automation. Windows PowerShell comes to your rescue when you have a bunch of administrative works to solve. For instance, you ask PowerShell to recognize the programs that are not performing accurately and kill them. Also in a network, you can ask PowerShell to exhibit you all the installed USB gadgets on one or many computers. Well, Windows PowerShell can really do lots of things. If you prefer to give a shot to it, read out different ways to run it in Windows 10 as administrator.

How to Run PowerShell as administrator in Windows 10

1. Through File Explorer

With this method, you can access Windows PowerShell to the location or place of any particular selected drive or folder.

  • Launch File Explorer, travel to the section where your preferred drive or folder is lying.
  • Tap on the folder to pick which you want to start in an elevated PowerShell and keypunch (press)  File on the extreme left portion of the menu bar.
  • From the arrived options, hit Open Windows PowerShell succeeding with Open Windows PowerShell as administrator.
  • Done!

2. Through Task Manager

  • Right-click on the deserted field of Taskbar and press the 3rd option from the bottom Task Manager.
  • Task manager Window emerges. On the left uppermost corner of menubar, you find File. Tap on this option. A drop-down comes fourth. choose the first choice from upward which says Run new task.
  • Create new task window will arrive now. In the text field, type powershell and select the option Create this task with administrative privileges.
  • Click Ok to continue.
  • PowerShell with administrator rights will be seen on your screen.

3. Through Taskbar Search

  • Click Taskbar search icon, type PowerShell in the text field and hit Enter key.
  • You will see Windows PowerShell option with its icon. Select Run as administrator from the right flyout.
  • PowerShell will be launched with administrator privileges.

4. Through from File Explorer again, but this time by Right Click Context menu.

  • Access File Explorer on your screen and take yourself to the underneath path –

C:\Windows\System32\WindowsPowerShell\v1.0

  • Look for powershell.exe lying in the middle part of the file explorer. Right-click on it and go with the option on the second place from the top which says Run as administrator.
  • These are the 4 different ways you can Run PowerShell as administrator in Windows 10.

Via Power user menu

  • Right click on Start lying at the bottom left corner of the screen. Select Windows PowerShell (admin).

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Типы окон в windows это
  • Windows 10 смена пароля пользователя через администратора
  • Можно ли удалить папку windows powershell
  • В windows 7 не идет время
  • Как установить приложения на андроид на windows phone