Search notes:

System.Windows.Forms.Clipboard (class)

System.Windows.Forms.Clipboard allows to access the clipboard.

Powershell example

The following exmaple determines if the data in the clipboard is in text format. If so, it assigns this text to the variable $copiedText.
add-type -assemblyName System.Windows.Forms

$clipboard = [System.Windows.Forms.Clipboard]::GetDataObject()

if ($Clipboard.ContainsText()) {
  $copiedText = $Clipboard.GetText()
}

Index