Created
January 15, 2026 11:47
-
-
Save pleabargain/dd151fca331bb5585fb26ac71630ab33 to your computer and use it in GitHub Desktop.
powershell to populate your clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add-Type -AssemblyName System.Windows.Forms | |
| # Input text block | |
| $text = @" | |
| Pluto the Dog | |
| pluto.the.dog@gmail.com | |
| Dog | |
| Pluto the Dog | |
| "@ | |
| # Clean and deduplicate | |
| $uniqueLines = $text -split "`n" | | |
| ForEach-Object { $_.Trim() } | | |
| Where-Object { $_ -ne "" } | | |
| Select-Object -Unique | |
| # Simulate copying each line | |
| foreach ($line in $uniqueLines) { | |
| [System.Windows.Forms.Clipboard]::SetText($line) | |
| Start-Sleep -Milliseconds 300 | |
| Write-Host "Copied: $line" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment