How to Write Clipboard to File
September 26, 2022 - 1 mins read time - 142 words - garrardkitchen
Have you ever wondered how to persist your clipboard to disk? Wonder no more… To get started, copy a random sentence into your clipboard like so: Set-Clipboard -Value "This is being copied into clipboard" Let’s confirm the contents of the clipboard, like so: Get-Clipboard output: This is being copied into clipboard We’ll now persist the same cliboard to a file, like so: Get-Clipboard | Out-File -FilePath clipboard.txt To confirm the contents of this file, we type: ...