How to Open PowerShell as Administrator in Windows 11

PowerShell 7 Icon

There are several ways to open PowerShell as Administrator in Windows 11. Users can run console applications in user mode or with elevated privileges, also known as "Run as Administrator." We have already covered in separate articles how to open Windows Terminal in Windows 11 and how to open PowerShell in Windows 11. Now it is time to show how to run PowerShell as Administrator in Windows 11.

PowerShell is an advanced scripting language and engine that comes with a huge set of built-in commands called "cmdlets". Cmdlets allow performing a wide range of tasks, from simple file operation and text processing to programming and system administrative tasks. More than that, the user can create custom modules and utilize .NET functions and assemblies for creating powerful utils and services using just PowerShell.

Note: To open PowerShell as Administrator, you need to log in using a profile with Administrator privileges. Otherwise, Windows will ask you to enter the Administrator password on a UAC prompt.

Tip: Unless you have disabled User Account Control prompts in Windows 11, launching PowerShell as Administrator always ends up in Windows asking for your permission to run a program with elevated privileges. If the operating system launches PowerShell without a UAC prompt, it runs in user mode (or UAC prompts are off).

Open PowerShell as Administrator in Windows 11

Perhaps the fastest way to open PowerShell as Administrator in Windows 11 is to use a new console app from Microsoft called Windows Terminal. Windows Terminal supports different profiles and uses PowerShell by default. Note that you can change the default Terminal application. Besides the Windows Terminal, you launch it from the Start menu, Search, or directly start it from the Run dialog, from Task Manager. Also, you can create a special shortcut to start it elevated. Let's review these methods.

Using Windows Terminal

All that you need to do is press Win + X or right-click the Start menu button. Then, click Windows Terminal (Admin). After that, Windows 11 will open a new instance of Windows Terminal in the PowerShell mode with elevated privileges.

We have a dedicated article about how to open Windows Terminal as Administrator in Windows 11.

Note that If you changed the default profile in Windows Terminal, then you need to select PowerShell from the 'profiles' down arrow button.

Always Run PowerShell as Administrator from Windows Terminal

Starting in version 1.3, Windows Terminal allows you to run any of its profiles as Administrator. You can use this new feature and set the PowerShell start elevated, and then make it your default profile. To check your current Windows Terminal version, launch the app and enter wt -v.  If you are running an older release, install the latest Windows Terminal version.

To always run PowerShell as Administrator from Windows Terminal, do the following.

  1. Open Terminal by right-clicking the Start button and selecting Windows Terminal (Admin).
  2. Click its menu button on the tab strip and select Settings. Or simply press Ctrl + , (comma).
  3. Select PowerShell in the left panel.
  4. On the right, find the "Run this profile as Administrator" toggle option and enable it.
  5. Click Save to apply changes.

Now you need to set the modified PowerShell profile as your default Windows Terminal profile. This will make it start every time you open the Terminal app.

Set PowerShell as the default Windows Terminal profile

  1. Press Ctrl + , (comma) to go to Windows Terminal Settings.
  2. Click Startup.
  3. Find the Default profile option and change it to PowerShell.
  4. Click Save to apply the changes.

Done!

Finally, you can make the PowerShell elevated by editing the JSON config file. If you prefer working with the JSON configuration, here is how to change it.

Edit the JSON file

  1. Open Windows Terminal and press Ctrl + , (comma) to open Settings.
  2. Click Open JSON file.
  3. Find PowerShell in profile JSON array.
  4. Add "elevate": true, (don't forget to add comma).
  5. Save the changes and close Notepad or whatever app you use to edit the file.

And that is how you make Windows Terminal always run PowerShell as Administrator. Now, every time you start the app, it will open to the elevated PowerShell tab. You will have to confirm the UAC prompt.

Open PowerShell as Administrator from Windows Tools

Unlike Windows 10, where PowerShell has a dedicated folder in the list of all apps, Windows 11 "stores" PowerShell alongside all system tools in a single folder called "Windows Tools." You can launch PowerShell from that folder.

To open PowerShell as Administrator in Windows 11, do the following.

  1. Open the Start menu and click the "All Apps" button.
  2. Scroll down and find the "Windows Tools" icon. Open Windows Tools folder and find PowerShell. 
  3. Right-click PowerShell and select Run as Administrator.
  4. Similarly, you can launch PowerShell ISE, or respective x86 versions of PowerShell.

Another quick and easy way to run PowerShell as Administrator is to use Windows Search.

How to open PowerShell in Windows 11 using Search

  1. Press the Start button and start typing PowerShell. You cal also press the search icon on the taskbar or use Win + S buttons.
  2. Enter PowerShell. Windows will show the app in the search results.
  3. Click Run as Administrator to open a new elevated PowerShell. Alternatively, you can press the Ctrl + Shift + Enter keys on the keyboard.

You can also open PowerShell in Windows 11 using the Run dialog box or Task Manager .

Open an Elevated PowerShell using the Powershell.exe command

  1. Press Win + R to open the Run dialog box, then enter PowerShell.
  2. Next, press Ctrl + Shift + Enter to execute the command. It is crucial to press exactly those buttons; otherwise, Windows will launch PowerShell in user mode.
  3. Similarly to Run, you can open PowerShell in Windows 11 from the Task Manager. Open Task Manager and click File > Run new task.
  4. Enter powershell in the Run text box.
  5. Place a checkmark next to "Create this task with administrative privileges".

That is how to access Windows 11 PowerShell with the command of the same name.

Open PowerShell as Administrator from the Windows 11 taskbar

If you have PowerShell running, you can press and hold the Ctrl and Shift keys on the keyboard, and click on the PowerShell icon in the taskbar. This will instantly open a new PowerShell window running as Administrator.

If you frequently use PowerShell in Windows 11, you could have it pinned to the taskbar to access the app with one click. If not, you can quickly get it done by opening PowerShell in Windows 11 using any method in this article, right-click the icon on the taskbar and click "Pin to taskbar."

After that, you can use the pinned icon to launch PowerShell as Admin (elevated). Press and hold the Ctrl and Shift keys simultaneously, and click on the PowerShell icon in the taskbar. It will start elevated.

Create a shortcut to open PowerShell as Administrator on the Desktop

A shortcut on the desktop is one more way to open PowerShell as Administrator.

  1. Right-click anywhere on the desktop or inside a folder and select New > Shortcut.
  2. In a new window, enter powershell.exe in the "Type the location..." field. Click Next.
  3. Name your shortcut as "PowerShell (Administrator) and click Finish.

Now you can right-click your newly made shortcut and select Run as Administrator.

But there is one more thing you can do to avoid right-clicking the shortcut every time you need to open PowerShell as Administrator.

Modify the shortcut to always run it as Administrator

  1. Right-click the shortcut you have just made and select Properties.
  2. On the Shortcut tab, click the Advanced button.
  3. On the next window, place a checkmark next to the "Run as Administrator" option.
  4. Click OK to save the changes.

That is it. Now you can open PowerShell as Administrator in Windows 11 using the desktop shortcut.

Tip: If you want to pin elevated PowerShell to the taskbar, right-click your shortcut and select Show more options, then click Pin to taskbar.

Add PowerShell as Administrator to the context menu

Pinning a shortcut to the taskbar is not the only quick way to open PowerShell as Administrator. You can add PowerShell to the context menu.

  1. Download the REG files using this link.
  2. Double-click the file Add Open PowerShell here as administrator.reg.
  3. Confirm the UAC prompt.
  4. Now, right-click any folder and select Show more options > Open PowerShell here as administrator.

The undo file is included into the archive. Double-click on the Remove Open PowerShell here as administrator.reg to delete the command from the context menu.

You can save your time using Winaero Tweaker. The app allows you to add the elevated PowerShell item to the context menu with a couple of clicks.

Add the elevated PowerShell context menu with Winaero Tweaker

  1. Download Winaero Tweaker and launch it.
  2. Open the Context Menu section in the left panel of the window.
  3. Click PowerShell as Administrator.
  4. Place a checkmark next to the "Add elevated PowerShell to the context menu" option.
  5. Click Apply changes.
  6. Now open any folder and right-click anywhere. Select Show More options.
  7. Click Open PowerShell here.

Now you know how to open PowerShell as Administrator in Windows 11. Any of those methods work equally, so you can use whichever you prefer.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Taras Buria

Taras is here to cover stories about Microsoft and everything around, although sometimes he prefers Apple.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.