How copy image to clipboard

Product: PowerShell Universal
Version: 4.2.16

Hello
I want to be able to copy selected image to clipboard
PU has its own command to set clipboard but it handles only text file
I found a code that works perfectly when its executed from powershell:

$bmp = New-Object Drawing.Bitmap("c:\temp\test.bmp")
[Windows.Forms.Clipboard]::SetImage($bmp)

but when executed from PU dashboard it throws an error:

'unable to find type [Windows.Forms.Clipboard]'

Windows.Forms will not work from PSU as PSU is a web service.

Windows forms works from powershell because you’re running in an interactive session and it’s setting the clipboard via that dot net class, which requires an interactive session with the user. Since PSU is a webservice, that layer is not presented and the client accessing is also in effect disconnected from that side of things anyway.

As you’ve mentioned Set-UDClipboard -data only takes strings, so I don’t think it would be possible using this, I would suggest putting in a feature request on github.

feature request created
https://github.com/ironmansoftware/powershell-universal/issues/3466