Skip to main content

Piping Command Line output to clipboard

·167 words·1 min
system-administration tech cmd command-prompt pipe sysadmin technology windows
James Pettigrove
Author
James Pettigrove
Cloud Engineer with a focus on Microsoft Azure

Piping output of applications is nothing new to those in the profession of IT (especially the *nix administrators out there) but there was a feature added to Windows 7/Server 2008 R2 that doesn’t seem to be widespread.

Any command that you enter at the Command Line prompt or CMD as we all know it as can be piped to the Windows clipboard with a simple argument. All you need to do is at | clip to your command.

For example, let’s pipe a list of power plans using powercfg to the clipboard:

powercfg /list | clip

The output of this looks like the below:

Notice how there is…no output.

Now let’s head into notepad and paste what is on the clipboard:

pipe_output

Hey presto, all the output from the command that would have displayed at the CMD prompt was piped into the clipboard and now into whatever output of your choosing (in this case, Notepad).

Fellow SysAdmin’s know what to do

PIPE, ALL THE THINGS

Cheers to fellow redditors for the find

Related

Windows 8.1 & Server 2012 R2 release dates announced
·153 words·1 min
system-administration tech sysadmin technology windows windows-8 windows-8-1 windows-server-2012-r2
If you have been hanging out for the latest release of Windows for either your home computer or your server farms the wait is almost over.
Make time to set (NTP) time
·401 words·2 mins
system-administration tech ntp sysadmin technology windows
Any any Windows domain environment one of the most overlooked but ultimately crippling when things are wrong component is time.
Certified Part 1
·605 words·3 mins
system-administration tech certification learning mcp mcts microsoft sysadmin technology windows windows-7
As of yesterday I am now a Microsoft Certified Professional (Technology Specialist: Windows 7, Configuration for those keeping score at home).