Skip to content
mnaoumov.dev
Go back

Copy PowerShell command into clipboard

Sometime I want to post my PowerShell commands into blog. I don’t like default host with stupid rectangular selection.

So the workaround I am using is

(Get-History)[-1].CommandLine | clip

It will copy last command you typed into Clipboard


Share this post on:

Previous Post
posh-git _ WARNING_ Could not find ssh-agent
Next Post
Dropbox and Symbolic Links