Forum Discussion
Open powershell in current folder as administrator W11
Hi,
In Windows 10 we can use the alt + f/s/a shortcut to open a elevated powershell window within the current folder.
I would like to see the same functionality within windows 11.
Kind regards,
8 Replies
- Alabamatom1963Iron Contributor
You could use Windows PowerToys and Create a Shortcut on the Keyboard.
Certainly! To create a keyboard shortcut to launch PowerShell using PowerToys, follow these steps:
1. **Install PowerToys** (if you haven't already):
- Download and install PowerToys from the official GitHub repository: [PowerToys GitHub](https://github.com/microsoft/PowerToys/releases).
2. **Open PowerToys Settings**:
- Launch PowerToys by searching for it in the Start menu or system tray.
- Click on the PowerToys icon in the system tray to open the settings.
3. **Navigate to Keyboard Manager**:
- In the PowerToys settings, click on "Keyboard Manager" in the left sidebar.
4. **Add a New Shortcut**:
- Click on the "Remap keys" tab.
- Under "Key Remapping," click the "Add" button to create a new key remapping.
- In the "Key" column, select the key combination you want to use as a shortcut (e.g., Ctrl + Alt + P).
- In the "Mapped To" column, choose "Launch a program" and browse to the location of your PowerShell executable (usually `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe`).
5. **Apply and Save**:
- Click "OK" to save the key remapping.
- Close the PowerToys settings window.
6. **Test Your Shortcut**:
- Press the configured key combination (e.g., Ctrl + Alt + P) to launch PowerShell.
Now you have a custom keyboard shortcut to open PowerShell using PowerToys! 🚀.
Remember to adjust the key combination and executable path according to your preferences and system configuration.At least this way it is available regardless of what app or program you are using.
- Jordan_ScholzenCopper ContributorI filed a feature request, please upvote to push it:
https://aka.ms/AApqwgl - coorellaCopper Contributor
Windows 11 has changed things totally. (scmcbeth has referred to it as well)
There is a workaround: browse to the folder in File Explorer, right click on the folder name and select Open in Terminal. (you might have to select More Options to see it)
Once it's opened, to get it to open as Administrator next time, click the little arrowhead just to the right of the tab, and select Settings.
The Default Profile should be Powershell (it was for me)
To get PS to open as Administrator, click Windows PowerShell in the left-hand menu, and turn on the toggle for Run this profile as Administrator.
Geez, it was a lot easier in Windows 10. There's a host of things about Win 11 File Explorer NOT to like...
- Reza_AmeriSilver ContributorYou had this functionality in the Windows 10, and it is missing in the Windows 11, is that correct?
If yes, open start and search for feedback and open the Feedback Hub app and report this issue.- FLafe95Brass ContributorHow do I downvote your un-helpful comment?
- scmcbethCopper Contributor
FLafe95 If you are still having issues, you can use terminal settings to handle it.
Open Terminal and go to settings
Under profiles, you can set each instance (powershell, bash, cmd) to run as admin by default in terminal.
You can then launch it in a folder using alt + f then enter.
I used this feature all the time on Windows 10 and was enough not to upgrade until I got a 11 laptop for work and had to find a way around it. It's still not the best as it means it always runs elevated but better than nothing.