CMDlet for Copying the last command to the clipboard.
Votes from Connect: 10
Original Date Submitted: 5/6/2015 6:05:20 AM
Handle: Dan Anstis, AUS
Site Name: PowerShell
Feedback ID: 1306453
It would be great if we could get a native CMDlet to copy the last command run into clipboard.
I currently do this via a Copy-Last function in my profile, however it is so handy that I would love it to be included on all PowerShell consoles that I use.
My function is as follows (for example of what I would like to see:
(Get-History)[-1].CommandLine | clip
Product Studio item created by Connect Synchronizer due to creation of feedback ID 1306453 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1306453).
Internal BugId: 14445