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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
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
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
In older cmd versions the location is a little bit different