How to Add "Open PowerShell window here as administrator" context menu in Windows 10
Windows 10 comes with Windows PowerShell 5.0 included.
Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.
For more details about Windows PowerShell, see:
This tutorial will show you how to add or remove a Open PowerShell window here as administrator context menu for all users in Windows 10.
You must be signed in as an administrator to add, remove, or use the "Open PowerShell window here as administrator" context menu.
The "Open PowerShell window here as administrator" context menu will be available when you right click or shift + right click on a folder, drive, or mapped network drive and when you right click or shift + right click on the background of a folder, drive, mapped network drive, library, or desktop.
EXAMPLE: "Open PowerShell window here as administrator" context menu
Here's How:
1 Do step 2 (add-right click), step 3 (add-Shift+right click) , or step 4 (remove) below for what you would like to do.
A) Click/tap on the Download button below to download the file below, and go to step 5 below.
Add_Open_PowerShell_window_here_as_administrator_context_menu.reg
Download
(Content of REG file for reference)
Code:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"=- "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"=- "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"=- "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\PowerShellAsAdmin] ; To allow mapped drives to be available in elevated PowerShell [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLinkedConnections"=dword:00000001
A) Click/tap on the Download button below to download the file below, and go to step 5 below.
Add_Shift+Open_PowerShell_window_here_as_administrator_context_menu.reg
Download
(Content of REG file for reference)
Code:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"="" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"="" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin] @="Open PowerShell window here as administrator" "Extended"="" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin\command] @="powershell -WindowStyle Hidden -NoProfile -Command \"Start-Process -Verb RunAs powershell.exe -ArgumentList \\\"-NoExit -Command Push-Location \\\\\\\"\\\"%V/\\\\\\\"\\\"\\\"" [-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\PowerShellAsAdmin] ; To allow mapped drives to be available in elevated PowerShell [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLinkedConnections"=dword:00000001
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 5 below.
Remove_Open_PowerShell_window_here_as_administrator_context_menu.reg
Download
(Content of REG file for reference)
Code:Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin] [-HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin] [-HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin] [-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\PowerShellAsAdmin]
5 Save the .reg file to your desktop.
6 Double click/tap on the downloaded .reg file to merge it.
7 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
8 You can now delete the downloaded .reg file if you like.
That's it,
Shawn Brink
Related Tutorials
- How to Open Windows PowerShell in Windows 10
- How to Open Elevated Windows PowerShell in Windows 10
- How to Add 'Open PowerShell window here' context menu in Windows 10
- How to Add PowerShell to Context Menu in Windows 10
- Show Command Prompt or Windows PowerShell on Win+X menu in Windows 10
- How to Add 'Open Bash window here' context menu in Windows 10
- How to Add 'Open Bash window here as administrator' context menu in Windows 10
- How to Add 'Open command window here' context menu in Windows 10
- How to Add 'Open command window here as administrator' context menu in Windows 10
- How to Add 'Run as administrator' to PS1 File Context Menu in Windows 10
- How to Add Edit with PowerShell ISE as administrator context menu in Windows 10
- How to Add Edit with PowerShell ISE x86 as administrator in Windows 10
- How to Enable or Disable Windows PowerShell 2.0 in Windows 10
- How to Check PowerShell Version in Windows
- Enable Mapped Drives to be Available in Elevated Command Prompt and PowerShell in Windows
- How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10