Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Send text to clipboard
function Out-ClipboardText {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline,Mandatory, Position = 0)]
[string] $Text
)
Add-Type -AssemblyName 'PresentationCore'
[System.Windows.Clipboard]::SetText($Text)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment