January 29th, 2014

PowerTip: Copy Information to the Clipboard with PowerShell

Doctor Scripto
Scripter

Summary: Learn how to easily copy information to the clipboard by using Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to copy WMI information to the Windows Clipboard
          so I can use it in another application?

Hey, Scripting Guy! Answer Use the external clip.exe utility to copy Windows PowerShell pipeline output to your Windows clipboard!
          For example, to get a list of WMI classes in the root\cimv2 namespace on your computer and then
          copy the list to the Windows clipboard, run the following command:

(Get-CimClass | Sort-Object –Property CimClassName).CimClassName | clip.exe;

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.