sindresorhus / clipboardy

Access the system clipboard (copy/paste)
MIT License
1.78k stars 81 forks source link

Powershell on Windows #89

Open Richienb opened 2 years ago

Richienb commented 2 years ago

Since Windows 7, Powershell has been pre-installed and contains Get-Clipboard and Set-Clipboard cmdlets:

Example of setting and getting clipboard contents in Powershell

There's also clip which copies to the clipboard.

Is this better than the custom pre-built binaries that are currently used?

sindresorhus commented 2 years ago

Not every system has PowerShell though. Admins can disable it. But I guess we could use this first and fall back to the custom one.