Copying Command History
You can copy your entire command history to the clipboard:
(Get-History).CommandLine | clip.exe
This technique uses automatic unrolling introduced in PowerShell 3.0. To use it in PowerShell 2.0, you would have to manually expand the CommandLine property like this:
Get-History | Select-Object -ExpandProperty commandline | clip.exe
To copy only the last five commands, simply add the -Count parameter to Get-History:
(Get-History -Count 5).CommandLine | clip.exe