The Computer Oracle

How to copy text from PowerShell

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Dreamlands

--

Chapters
00:00 How To Copy Text From Powershell
00:23 Accepted Answer Score 64
00:50 Answer 2 Score 33
01:04 Answer 3 Score 2
01:20 Answer 4 Score 11
01:29 Thank you

--

Full question
https://superuser.com/questions/302032/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#powershell

#avk47



ACCEPTED ANSWER

Score 64


Just select the text in the console window and press enter or the right mouse button. That selected text ends up in your clipboard.

Note that this will only work if QuickEdit mode is enabled for the console window. If it is not, then either enable it in the console window properties (System menu → Properties → Options) or enter Mark mode via System menu → Edit → Mark (Alt+Space, E, K on an English Windows).




ANSWER 2

Score 33


Or send the output of your command directly to clipboard using clip.exe For example,

Get-ChildItem C:\Test -recurse | Clip



ANSWER 3

Score 11


Go to the menubar, top left, Edit, Select All, Copy, paste in notepad




ANSWER 4

Score 2


Have a look at Send Text in Clipboard to Application like Notepad (C# or Powershell). You will find some more tips. However, answer by @Wictor is probably the easiest solution.