Read the Clipboard With Get-Clipboard
Print whatever text is currently on the Windows clipboard.
Run Get-Clipboard to print the clipboard text.
01Command
Command
$ Get-Clipboard02What 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
!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-ClipboardEvidence: Reads text, files or images from the Windows clipboard.
Last verified: 2026-09-20 · Category: System & Settings
06Related solutions
Grep on Windows: Select-String
Search inside text files and logs with regex, returning file, line number and match.
Zip Files with Compress-Archive
Create or update a .zip from any files or folder contents straight from PowerShell.
Test a TCP port connection on Windows with Test-NetConnection
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.