Search notes:

PowerShell cmdLet Get-Clipboard

get-clipboard returns the content of the clipboard.

Saving an image that is stored in the clipboard

If an image is copied into the clipboard, get-clipbaord with -format image returns an object whose type is System.Drawing.Bitmap. Such an object has the Save() method to store the image on hard disk:
$img = get-clipboard -format image
$img.Save("$pwd\lakes-and-trees.png")

Linux

On Linux, get-clipboard requires the xclip utility to be referenced in the PATH environment variable.

See also

Powershell command noun: clipboard

Index