6

Let's say that I'm browsing through Windows File Explorer, and suddenly I decide that I would like to open Powershell as administrator at the current directory (the directory that I'm at in File Explorer). Naturally, I'd like to open this as quickly as possible, so a keyboard shortcut to do this would be desirable.

I presume that this may only be possible to do with AutoHotKey, which I am open to using if necessary. Any way to create a keyboard shortcut to do this is what I want. So how can I achieve this?

17

You can do this with the native method by simply clicking in the folder you wish to open Powershell as administrator from File Explorer, and then press AltFSA one key right after the other.

  1. Click in or on the folder which you want to open as administrator from PowerShell

    enter image description here

  2. Press Alt then F

    enter image description here

  3. Press S

    enter image description here

  4. Press A

    enter image description here

  5. Now PowerShell will open as administrator in that folder as requested.

    enter image description here

  • 4
    These drawings are completely wrong. 1) They're not red. 2) They're not freehand. 3) They're not circles. – Sombrero Chicken Apr 1 '18 at 12:57
  • 3
    @SombreroChicken 3) They are circles with corners. 2) Poster may have had a steady hand due to lack of alcohol. 1) It's not easy being green. – Andrew Morton Apr 1 '18 at 15:11
2

Shift click while inside the folder and click 'Open PowerShell window here'

GIF

I'm not sure if this is what you wanted, but seeing the other response, this seems a lot easier...

  • 2
    Question asked about opening as administrator, which doesn't happen here, right? – palsch Apr 1 '18 at 13:29
  • @palsch It depends whether you're lo̶g̶g̶e̶d̶ ̶i̶n̶ ̶a̶s̶ ̶r̶o̶o̶t̶ using an admin %SHELL%. But almost certainly not. – wizzwizz4 Apr 1 '18 at 15:48
  • Oh. Should I remove this answer then, or do I keep it? – Matt Apr 2 '18 at 9:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.