Get-Clipboard / Set-Clipboard

Topics: Developer Forum
Dec 24, 2006 at 7:34 AM
The usage of Set-Clipboard isn't ideal:

Get-Clipboard -rtf | %{$_ -replace "PSCX", "PscxDude"} | Set-Clipboard -rtf {$_}

I wonder if we should lump all three "text" formats (text, rtf, html) into one parameter set. Then create an enum for the "format" which defaults to text. In fact you could change this cmdlet to accept PSObject and then check for FileSystemInfos, Images and then Strings. In the case of strings default to text unless the user specifies -Format Rtf or -Format Html. I think this would make Set-Clipboard much easier to use. Oh yeah, you could even handle XmlDocument or anything by calling ToString(). Thoughts?
Dec 24, 2006 at 4:55 PM
This discussion has been copied to Work Item 6782. You may wish to continue further discussion there.