Skip to content

Powershell Preview: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made #1756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
skest3qc opened this issue Feb 12, 2019 · 1 comment
Labels

Comments

@skest3qc
Copy link

Hi,

i just tried this piece of code:

"out " | Set-Clipboard

and got this error:
Set-Clipboard : Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.

It works in Windows Powershell 5.1

#1571

@SydneyhSmith
Copy link
Collaborator

@skest3qc thanks for reporting that you are still having an issue I will re-open #1571 and we will do more investigation to the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants