Get-Clipboard PowerShell Command

Get-Clipboard | Taking on PowerShell one cmdlet at a time | Weekly Blog

Share this post:

This is a part of an on-going blog series written by Adam Gordon. Each week, Adam will walk you through a PowerShell command, showing you when and how to use each one. This week, Adam covers Get-Clipboard.

When to use Get-Clipboard?

The Get-Clipboard cmdlet gets the contents of the clipboard as text. Multiple lines of text are returned as an array of strings similar to Get-Content.

 Note: On Linux, this cmdlet requires the xclip utility to be in the path.

What version of PowerShell am I using?

Get the PowerShell Version from your machine:

$PSVersionTable

This command shows you the PowerShell version information on your machine.

How to use Get-Clipboard?

Get the content of the clipboard and display it to the command-line:

Get-Clipboard

Learn last week’s command: New-FileCatalog.

Need PowerShell training? Check out ITProTV’s PowerShell online IT training courses.