Thursday, June 26, 2014

Copying PowerShell Output to the Clipboard.

 

Picture1

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.

25-06-2014 22-57-58 

Let's pass the output of Get-ChildItem to the clip.exe and see what will happen

25-06-2014 23-01-54

No output in the console , seems something happened.

Now open Notepad and type Control + V

25-06-2014 23-02-14

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”.

1 comment:

  1. Unless you have a reason you want to do this programmatically, it seems simpler to just use keyboard shortcuts:

    Alt+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]

    ReplyDelete

Note: Only a member of this blog may post a comment.