Get-History | Select –Expand CommandLine | Out-File script.ps1