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

MajorGeeks.com - Pretty major, always geeky.

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



IObit Black Friday Sale

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. Smart Defrag
4. MusicBee
5. Sergei Strelec's WinPE
6. McAfee Removal Tool (MCPR)
7. Visual C++ Redistributable Runtimes AIO Repack
8. Microsoft Visual C++ 2015-2022 Redistributable Package
9. Format Factory
10. Visual C++ Runtime Installer (All-In-One)
More >>

top reads

Star Best Audio Players for Windows - Treat Your Local Music Library Right

Star Why Are RAM Prices Skyrocketing?

Star Stop Windows 11 From Spying On You: Free Tools and PowerShell

Star AI Answers: Authority Without Accountability

Star Fun with CMD: 5 Windows command-line tools for music, video, and more

Star All the New Features Landing in Windows 11 This December

Star Lossless vs Lossy: When FLAC, APE, and ALAC Beat MP3 and When They Don't

Star Google Search Tricks You'll Actually Use in 2025 and Beyond

Star Fresh PC Checklist: First 12 Things to Do On a New Windows 11 Machine

Star Running AI Models Locally: What They Are, Where to Find Them, and How to Get Started


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

⚡ Black Friday Blowout! IObit Pro Up to 90% Saving PLUS $5 off! ⚡
Once-a-year pricing on speed, privacy, and protection. Don’t miss the best deal IObit drops all year!

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