How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10  

    How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10

    How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10

    Published by Category: Customization
    15 Jun 2021
    Designer Media Ltd



    How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10


    PowerShell 7 is the latest major update to PowerShell, a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. PowerShell includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules.

    This tutorial will show you how to add or remove the PowerShell 7 'Open here' and 'Open here as administrator' context menu in File Explorer for all users in Windows 10.

    This tutorial requires PowerShell 7 to already be installed for the context menu to work.

    You must be signed in as an administrator to add or remove the PowerShell 7 "Open here" context menus.



    Contents

    • Option One: Add 32-bit or 64-bit PowerShell 7 "Open here" context menus while installing PowerShell 7
    • Option Two: Add or Remove 32-bit PowerShell 7 (x86) "Open here" context menus using a REG file
    • Option Three: Add or Remove 64-bit PowerShell 7 "Open here" context menus using a REG file



    EXAMPLE: PowerShell 7 "Open here" context menus
    How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10-powershell_7_open_here_context_menu.png






    OPTION ONE

    Add 32-bit or 64-bit PowerShell 7 "Open here" context menus while installing PowerShell 7


    1 While installing PowerShell 7, check the Add 'Open here' context menus to Explorer box. (see screenshot below)

    You can install the PowerShell-7.0.1-win-x86.msi (32-bit PowerShell 7) and/or PowerShell-7.0.1-win-x64.msi (64-bit PowerShell 7) file(s) in 64-bit Windows 10.

    You can only install the PowerShell-7.0.1-win-x86.msi (32-bit PowerShell 7) file in 32-bit Windows 10.

    How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10-install_powershell_7.png






    OPTION TWO

    Add or Remove 32-bit PowerShell 7 (x86) "Open here" context menus using a REG file


    The downloadable .reg files in this option will only work if you installed the 32-bit PowerShell 7 (x86) to the default location below.

    32-bit Windows 10 = "C:\Program Files\PowerShell"

    64-bit Windows 10 = "C:\Program Files (x86)\PowerShell"


    1 Do step 2 (add - 32-bit W10), step 3 (add - 64-bit W10) or step 4 (remove) below for what you would like to do.


    2 To Add 32-bit PowerShell 7 (x86) "Open here" context menus in 32-bit Windows 10

    A) Click/tap on the Download button below to download the file below, and go to step 5 below.

    Add_32-bit_PowerShell_7_Open_here_context_menu_on_32-bit_Windows_10.reg

    Download


    3 To Add 32-bit PowerShell 7 (x86) "Open here" context menus in 64-bit Windows 10

    A) Click/tap on the Download button below to download the file below, and go to step 5 below.

    Add_32-bit_PowerShell_7_Open_here_context_menu_on_64-bit_Windows_10.reg

    Download


    4 To Remove 32-bit PowerShell 7 (x86) "Open here" context menus

    A) Click/tap on the Download button below to download the file below, and go to step 5 below.

    Remove_32-bit_PowerShell_7_Open_here_context_menu.reg

    Download


    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.






    OPTION THREE

    Add or Remove 64-bit PowerShell 7 "Open here" context menus using a REG file


    The downloadable .reg files in this option will only work if you installed the 64-bit PowerShell 7 to the default location below.

    64-bit Windows 10 = "C:\Program Files\PowerShell"


    1 Do step 2 (add) or step 3 (remove) below for what you would like to do.


    2 To Add 64-bit PowerShell 7 "Open here" context menus in 64-bit Windows 10

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Add_64-bit_PowerShell_7_Open_here_context_menu_on_64-bit_Windows_10.reg

    Download


    3 To Remove 64-bit PowerShell 7 "Open here" context menus

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Remove_64-bit_PowerShell_7_Open_here_context_menu.reg

    Download


    4 Save the .reg file to your desktop.

    5 Double click/tap on the downloaded .reg file to merge it.

    6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

    7 You can now delete the downloaded .reg file if you like.


    That's it,
    Shawn





  1. Posts : 16,029
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Another great tutorial as always @Brink!
      My Computer


  2. Posts : 61,587
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

      My Computers


  3. Posts : 13
    Windows 11 Pro 64-bit 22H2 22621.1
       #3

    I am really confused as to how this works. I'm trying to customize the menu so that there is no submenu.

    Code:
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell7x64\shell\openpwsh\command]
    @="C:\\Program Files\\PowerShell\\7\\pwsh.exe -NoExit -RemoveWorkingDirectoryTrailingCharacter -WorkingDirectory \"%V!\" -Command \"$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'\""
    Has the same command as:

    Code:
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell7x64\shell\runas\command]
    @="C:\\Program Files\\PowerShell\\7\\pwsh.exe -NoExit -RemoveWorkingDirectoryTrailingCharacter -WorkingDirectory \"%V!\" -Command \"$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'\""
    How does the admin prompt get invoked if it has the exact same command as the non-admin? Am I missing something?
      My Computer


  4. Posts : 61,587
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    cultmethod said:
    I am really confused as to how this works. I'm trying to customize the menu so that there is no submenu.

    Code:
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell7x64\shell\openpwsh\command]
    @="C:\\Program Files\\PowerShell\\7\\pwsh.exe -NoExit -RemoveWorkingDirectoryTrailingCharacter -WorkingDirectory \"%V!\" -Command \"$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'\""
    Has the same command as:

    Code:
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell7x64\shell\runas\command]
    @="C:\\Program Files\\PowerShell\\7\\pwsh.exe -NoExit -RemoveWorkingDirectoryTrailingCharacter -WorkingDirectory \"%V!\" -Command \"$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'\""
    How does the admin prompt get invoked if it has the exact same command as the non-admin? Am I missing something?
    Hello,

    The having the command under the runas key is what allows the same command to Run as administrator.
      My Computers


  5. Posts : 13
    Windows 11 Pro 64-bit 22H2 22621.1
       #5

    Brink said:
    Hello,

    The having the command under the runas key is what allows the same command to Run as administrator.
    Ahhhh! It all makes sense now. :)
      My Computer


  6. Posts : 9
    10
       #6

    There hasn't been a similar tutorial for normal built-in Windows Powershell, right? (I mean, the one that has all both elevated and non-elevated items cascaded in a menu.)
      My Computer


  7. Posts : 61,587
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #7

    hunggnuh85 said:
    There hasn't been a similar tutorial for normal built-in Windows Powershell, right? (I mean, the one that has all both elevated and non-elevated items cascaded in a menu.)
    Hello,

    I have tutorials to add the built-in Windows PowerShell context menus below, but they are separate instead of cascading.

    Open PowerShell window here context menu - Add in Windows 10

    Add Open PowerShell window here as administrator in Windows 10
      My Computers


  8. Posts : 9
    10
       #8

    Brink said:
    Hello,
    I have tutorials to add the built-in Windows PowerShell context menus below, but they are separate instead of cascading.
    Yes, I know about those. Just desperately hope that there was a pre-made REG for the cascaded version like Command Prompt. Thank you, I'll combine them by myself
      My Computer


 

Tutorial Categories

How to Add or Remove PowerShell 7 Open Here Context Menu in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 04:41.
Find Us




Windows 10 Forums