# 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: 5972
# x-archived: 2016-05-24T22:21:49
# x-published: 2016-08-11T08:14: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()
}