Providing Free and Editor Tested Software Downloads
< HOME | TUTORIALS | GEEK-CADE| WEB TOOLS | YOUTUBE | NEWSLETTER | DEALS! | FORUMS | >

MajorGeeks.com - Because sometimes it is rocket science.

Software Categories

All In One Tweaks
Android
Antivirus & Malware
Appearance
Back Up
Browsers
CD\DVD\Blu-Ray
Covert Ops
Drivers
Drives (SSD, HDD, USB)
Games
Graphics & Photos
Internet Tools
Linux Distros
MajorGeeks Windows Tweaks
Multimedia
Networking
Office & Productivity
System Tools

Other news

· How To and Tutorials
· Life Hacks and Reviews
· Way Off Base
· MajorGeeks Deals
· News
· Off Base
· Reviews




spread the word

· YouTube
· Facebook
· Instagram
· Twitter
· Pintrest
· RSS/XML Feeds
· News Blur
· Yahoo
· Symbaloo

about

· Top Freeware Picks
· Malware Removal
· Geektionary
· Useful Links
· About Us
· Copyright
· Privacy
· Terms of Service
· How to Uninstall

top downloads

1. GS Auto Clicker
2. Macrium Reflect FREE Edition
3. FlyOobe / Flyby11
4. Smart Defrag
5. Visual C++ Runtime Installer (All-In-One)
6. Visual C++ Redistributable Runtimes AIO Repack
7. Sergei Strelec's WinPE
8. K-Lite Mega Codec Pack
9. Unlocker
10. MusicBee
More >>

top reads

Star How to Set Up an Automatic Backup Plan In a Few Clicks

Star How To Skip Windows 11 Hardware Checks & Keep Windows 10 in 2025 - The Ultimate Guide

Star Star Trek Fleet Command Promo Codes: Redeem Codes for Free Shards, Blueprints And Resources

Star How to Disable 1-Click Ordering on Amazon (and Avoid Surprise Charges)

Star How to Fix Shallow Paint Layer Depth in Bambu Studio

Star Windows Recall: What It Is, Why Hackers Will Love It, and How to Stay Safe

Star How To Use VLC Media Player to Trim Video Clips

Star What Is the $WinREAgent Folder and Can I Delete It?

Star Swear Your Way to Better Search Results

Star How to Get a Dark Start Menu and Taskbar in Windows 10 & 11


MajorGeeks.Com » Overview» Tutorials and Video Guides » Open Powershell Window Here as Administrator Context Menu

Open Powershell Window Here as Administrator Context Menu

By Timothy Tibbetts

on 06/15/2023

IObit Mid-Year Sale: 90% OFF + Mystery Treat Experience faster surfing, smarter security, and total privacy with IObit Pro,
now yours at 90% OFF plus a mystery treat!

PowerShell users might find it useful to add "Open Powershell Window Here" to their Context Menu for quick access. Using PowerShell (go figure), this is easy to accomplish.

Back up your registry before proceeding, should you change your mind.

Open PowerShell as Admin by pressing the Windows Key + X.

Copy and paste the following code into PowerShell and press the Enter key:


$menu = 'Open Windows PowerShell Here as Administrator'
$command = "$PSHOMEpowershell.exe -NoExit -NoProfile -Command ""Set-Location '%V'"""

'directory', 'directorybackground', 'drive' | ForEach-Object {
New-Item -Path "Registry::HKEY_CLASSES_ROOT$_shell" -Name runascommand -Force |
Set-ItemProperty -Name '(default)' -Value $command -PassThru |
Set-ItemProperty -Path {$_.PSParentPath} -Name '(default)' -Value $menu -PassThru |
Set-ItemProperty -Name HasLUAShield -Value ''
}


While there are many registry files available on the internet to accomplish the same thing, we found this single-step method worked better.

Many guides also forget to mention that you can click on File > Open Windows PowerShell if using File Explorer.

If you change your mind, you can restore from the registry or download ShellExView.

You can also download these instructions and take them with you.

Similar:
How to Delete, Add, and Edit Context Menu Items
How to Fix a Screwed Up Right-Click Context Menu
Add the Control Panel to the Context Menu in Windows 10
Add 'Kill All Not Responding Tasks' Context Men
How to Add File Hash to the Context Menu
How to Restore Missing Pin to Start Context Menu in Windows 10
How to Add Timeline or TaskView to the Windows 10 Context Menu
Remove the "Share" Context Menu in Windows 10

comments powered by Disqus





© 2000-2025 MajorGeeks.com
Powered by Contentteller® Business Edition