This is a cool tips.
I don't know if you ever think about copy the PowerShell Output to the Clipboard.
I was thinking about the same, it comes handy sometimes.
I have a found a inbuilt exe names a clip. We just need to pass the output to the clip.exe using pipeline, and the PowerShell output will get copied to the clipboard.
Lets' see.
Let's pass the output of Get-ChildItem to the clip.exe and see what will happen
No output in the console , seems something happened.
Now open Notepad and type Control + V
and here we go, the output of PowerShell command get copies to the clipboard.
That's all for now.
Regards
Aman Dhally
Come and join my journey of : “100 Days of Self Improvement” on
Facebook: https://www.facebook.com/100DoSI
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube” channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.
Unless you have a reason you want to do this programmatically, it seems simpler to just use keyboard shortcuts:
ReplyDeleteAlt+Space (or Right-click on Title Bar) > E > S > Right-click
[works in PowerShell 2.0, but should also work in 3.0 - 5.0]