PowerShell with a Purpose Blog

Why Doesn't PowerShell do Copy and Paste?

Oh, it does. Just not as easily as you might expect.

When you open PowerShell.exe, you're really launching a very small console application that hosts the actual PowerShell engine. That console is (more or less) the same one used by Cmd.exe and other tools; it isn't "owned" by the PowerShell team. Because SO many bits of Windows have dependencies on that console, the PowerShell team can't even really make changes to it. (See also, " PowerShell Command Shell Tips and Tricks " and " Gettiing Started with PowerShell ").

Fun story: PowerShell v1 shipped (in 2006) without support for double-byte character sets. You know, like Asian languages, some European languages, etc. That's because the console app is so old (NT 3.1 anyone?). So in PowerShell v2, one of the big reasons the PowerShell team developed their own "graphical host" (the ISE) was to get an environment THEY could control. One that supported TrueType/OpenType fonts and double-byte character sets.

The ISE supports normal copy and paste operations using Ctrl+C, Ctrl+V, and Ctrl+X. The console app doesn't use those keyboard shortcuts, although if you click the window's control box you still get the good old Edit menu, just like you do in Cmd.exe. So you can copy and paste - it's just a hassle. Actually, the team was able to make some changes so that you can highlight text (using your mouse) at any time, press Enter to copy to the clipboard, and right-click to paste. That's a big improvement over Cmd.exe, at least - but it's definitely not as convenient as what you can do in the ISE.

The bottom line? If you want a more modern, Windows-like experience, use the ISE. Or, look into a commercial replacement shell like PowerShell Plus from Idera. But don't hold your breath for huge improvements to that old text-based console app. As I said, the huge number of dependencies upon it make it a tricky thing to modify, so it's likely to stay more or less the same, more or less forever.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.