Read the Clipboard With Get-Clipboard

Print whatever text is currently on the Windows clipboard.

WindowspowershellclipboardproductivityLow risk
Run Get-Clipboard to print the clipboard text.

01Command

Command
$ Get-Clipboard

02What it does

Get-Clipboard returns the clipboard contents as strings, or as file paths when files were copied. It pairs naturally with Set-Clipboard for pipelines, and -Raw preserves line breaks instead of returning an array of lines.

03Risk

RiskLow risk
RequirementsWindows 10/11 with PowerShell 5.1 or PowerShell 7+
!Warning: Clipboard contents may contain sensitive data; be careful when writing the output to logs or files.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-Clipboard
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Reads text, files or images from the Windows clipboard.

Last verified: 2026-09-20 · Category: System & Settings

06Related solutions