PoshCode Archive  Artifact [906216ac65]

Artifact 906216ac6584cad212930ddb68c21fb2095dcb1b7de5b45fd73a3f83feeb9517:

  • File Get-ClipboardText.ps1 — part of check-in [7b273f8066] at 2018-06-10 13:48:22 on branch trunk — This function retrieves the (Unicode) text from the clipboard. (user: Matthew Sessions size: 559)

# encoding: ascii
# api: powershell
# title: Get-ClipboardText
# description: This function retrieves the (Unicode) text from the clipboard.
# version: 0.1
# type: function
# author: Matthew Sessions
# license: CC0
# function: Get-ClipboardText
# x-poshcode-id: 4980
# x-archived: 2015-01-31T20:31:21
# x-published: 2015-03-12T21:28:00
#
#
Function Get-ClipboardText
{
    [CmdletBinding()]
    [OutputType([String])]
    
    Param() # No parameters
    
    [System.Windows.Forms.Clipboard]::GetText( 'UnicodeText' ) | Write-Output
}