# encoding: ascii
# api: powershell
# title: Get-Clipboard.ps1
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 0.1
# author: Lee Holmes
# license: CC0
# x-poshcode-id: 2150
# x-archived: 2017-05-22T03:11:33
# x-published: 2011-09-09T21:40:00
#
#
#############################################################################
##
## Get-Clipboard
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
<#
.SYNOPSIS
Retrieve the text contents of the Windows Clipboard.
.EXAMPLE
PS >Get-Clipboard
Hello World
#>
Set-StrictMode -Version Latest
PowerShell -NoProfile -STA -Command {
Add-Type -Assembly PresentationCore
[Windows.Clipboard]::GetText()
}