Skip to content

Instantly share code, notes, and snippets.

@pleabargain
Created January 15, 2026 11:47
Show Gist options
  • Select an option

  • Save pleabargain/dd151fca331bb5585fb26ac71630ab33 to your computer and use it in GitHub Desktop.

Select an option

Save pleabargain/dd151fca331bb5585fb26ac71630ab33 to your computer and use it in GitHub Desktop.
powershell to populate your clipboard
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