Things I Learned #7: PowerShell and the clipboard

less than 1 minute read til learning Comments

After I posted yesterday's edition of "Things I Learned", I received a great comment on Mastodon from Dave Carroll.

A post from Mastodon.
A post on Mastodon from @thedavecarroll@fosstodon.org

TIL

I learned that you can easily dump output from PowerShell directly to the clipboard! That's pretty cool! Just pipe data to the Set-Clipboard cmdlet!

ls | Set-Clipboard
To follow-up on yesterday's post, you can pipe the results to ConvertTo-Html and then push that to the clipboard and then paste directly into whatever editor you want, saving the step of using an intermediate file.
Get-AzResourceGroup | ConvertTo-Html | Set-Clipboard

I still have a lot to learn about PowerShell, and today I discovered a cool resource! PowerShell Weekly – Your weekly round up of all things PowerShell

Updated:

Comments