< Back

Get-Clipboard

Tue Jan 29, 2019 10:19 pm

NAME Get-Clipboard



SYNOPSIS

Gets the current Windows clipboard entry.





SYNTAX

Get-Clipboard [-Format {Text | FileDropList | Image | Audio}] [-Raw] [-TextFormatType {Text | UnicodeText | Rtf | Html | CommaSeparatedValue}]

[<CommonParameters>]





DESCRIPTION

The Get-Clipboard cmdlet gets the current Windows clipboard entry.





PARAMETERS

-Format <ClipboardFormat>

Specifies the type, or format, of the clipboard. The acceptable values for this parameter are:



- Text



- FileDropList



- Image



- Audio



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Raw [<SwitchParameter>]

Indicates that this cmdlet ignores newline characters and gets the entire contents of the clipboard.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-TextFormatType <TextDataFormat>

Specifies the text data format type of the clipboard. The acceptable values for this parameter are:



- Text



- UnicodeText



- Rtf



- Html



- CommaSeparatedValue



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String, System.IO.FileInfo, System.IO.Stream, System.Drawing.Image







NOTES









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



PS C:\\>Get-Clipboard

This is a test string.



This command displays the contents of the clipboard to the command-line.

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



PS C:\\>Get-Clipboard

http://upload.wikimedia.org/wikipedia/e ... l_icon.png



This command displays the link, as a URL, of the image that is stored in the clipboard.



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=526219

Set-Clipboard