PowerTip: Copy Information to the Clipboard with PowerShell

Doctor Scripto

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;

0 comments

Discussion is closed.

Feedback usabilla icon