How to disable right-click to paste in PowerShell?

5,930

This is a feature called QuickEdit of the console, not PowerShell. In previous versions of cmd it's turned off by default. It was claimed that Windows 10 turns it on by default but I'm not able to check since I've always had it enabled since Windows 7

To disable that feature just open the console menu, either by

  • right clicking on the console title bar
  • pressing Alt+Space
  • or left clicking on the title bar logo

then select Properties or Defaults depending on whether you want to set the options for that sessions or for all further execution. In the Options tab, Edit Options group uncheck the QuickEdit Mode

Now you can't paste by right click anymore but you also lose the ability to select text by mouse or by Shift+Arrow keys and must switch to mark mode by opening the context menu > Edit > Mark to select

PowerShell

In older cmd versions the location is a little bit different

cmd

See also What does it do exactly if I click in the window of cmd?

Share:
5,930

Related videos on Youtube

Mikal Madsen
Author by

Mikal Madsen

Updated on September 18, 2022

Comments

  • Mikal Madsen
    Mikal Madsen over 1 year

    How can I disable right-click to paste in PowerShell?

    From other programs I have a habit of right-clicking for context menu, and depending on the contents of the clipboard, in PowerShell this can be lethal.

    • Ramhound
      Ramhound over 5 years
      You should edit your question to indicate which version of Windows you are using. The current answer only applies to Windows 10, and specific build of Windows 10, so knowing what version you are running is important.
    • phuclv
      phuclv over 5 years
      @Ramhound it applies to any Windows and even cmd.exe