get-clipboard
returns the content of 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")
get-clipboard
requires the xclip
utility to be referenced in the PATH
environment variable.