# Windows 10 - Add back 'Open command window here'


In most recent versions of Windows 10, PowerShell is the default console. If you open file explorer and shift + right click, you will get the option to **Open a PowerShell window here** (as below).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035566061/36780ca6-4615-49a2-8471-1d3dbefb2612.png)

<!--truncate-->

This is fine (even great) in most cases but recently I've had a few users who want to be able to go back to opening cmd.exe from within a folder.

In order to be able to enable this option you will need to modify some registry entries. So be sure you know what you're doing before attempting this (and maybe perform a backup just in case).

- Open **regedit** (Windows + R keys > Type regedit > Press Enter)
- Browse to the following path:
    **HKEY\_CLASSES\_ROOT\\Directory\\shell\\cmd**
- Right click the **cmd** folder and click **Permissions**
- Press the **Advanced** button
- Next to **Owner**, press **Change**.
- You can enter your account name or select a local group like **Administrators**.
    - If you're on a AAD domain joined system, you may need to use the Administrators group as you domain account isn't discoverable from within this window.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035567349/c6c17a94-8528-4af5-af16-d0c77e7a7f32.png)

- Check the **Replace owner on subcontainers and objects** option

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035568730/2816b322-cbe2-4c84-bb8b-3fc260e9644f.png)

- Press **Apply** and then **OK**
- On **Permissions** select the **Administrators** group.
- Under **Permissions for Administrators**, select **Allow** for the **Full Control** option.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035569884/f01808ef-5b19-4dee-963c-0973d8dffec6.png)

- Press **Apply** and then **OK**
- Inside the cmd key, rename the REG\_DWORD **HideBasedOnVelocityId** to **ShowBasedOnVelocityId**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035571291/c013ba4c-32c9-4950-afb3-2fe9e47cbd94.png)

- If you select a folder within folder explorer and press Shift + Right click, you should now see the new option.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035572511/0f02e237-7efc-4e94-b328-9dbb0b3b952c.png)

If you would like to be able to right click on the background of a file explorer window to open a command console you will need to perform the following steps.

- Still in **regedit**, browse to:
    **HKEY\_CLASSES\_ROOT\\Directory\\Background\\shell\\cmd**
- Repeat the same steps as before to change the owner and permissions for the cmd key.
- Inside the cmd key, rename the REG\_DWORD **HideBasedOnVelocityId** to **ShowBasedOnVelocityId**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035573741/c5b27efe-6286-41cc-9cc2-a570ee39cd39.png)

- You should now see the Open command window here option when shift+right clicking on an open folder

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706035575177/14a8a651-7e82-4d39-bbb7-3bd29faaa322.png)

You can go a few steps further an implement your own options. I have one setup that opens PowerShell as administrator in the folder's directory. This saves me having to navigate to the folder after opening an elevated command session.

There are some steps available [here](https://www.tenforums.com/tutorials/59686-open-command-window-here-administrator-add-windows-10-a.html) to help you on your way.

