PowerShell / WindowsCompatibility

Module that allows Windows PowerShell Modules to be used from PSCore6
Other
137 stars 33 forks source link

Set-Clipboard doesn't work #54

Closed SteveL-MSFT closed 5 years ago

SteveL-MSFT commented 5 years ago
PS C:\Users\slee> Import-WinModule microsoft.powershell.management
PS C:\Users\slee> "hello" | Set-Clipboard
When the runspace is set to use the current thread, the apartment state in the invocation settings must match that of the current thread.
+ CategoryInfo          : NotSpecified: (:) [], InvalidOperationException
+ FullyQualifiedErrorId : RemotePSInvocationStateInfoReason
+ PSComputerName        : localhost
BrucePay commented 5 years ago

Hmm - I can't repro this with 1.0 and 6.1:

PSCore (1:15) >  'hi' | set-clipboard
PSCore (1:16) >  Get-Clipboard
hi
PSCore (1:17) >
SteveL-MSFT commented 5 years ago

Doesn't repro for me with 1.0 and 6.2-preview.2, so closing