How to disable right-click to paste in PowerShell?
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
In older cmd versions the location is a little bit different
See also What does it do exactly if I click in the window of cmd?