by oising
10. August 2008 15:36
With PowerShell’s new –STA startup switch, interacting with the Windows Forms object model was never so easy:
PS> $text = & {powershell –sta {add-type –a system.windows.forms; [windows.forms.clipboard]::GetText()}}
Easy, eh?