Over the years I’ve posted variations on this technique and discuss it often in my training classes. The idea is to take your PowerShell transcript and transform it into a PowerShell script. Remember that there is very little difference between running commands in the shell and in a script. Thus, any commands that have been…
Tag: transcript
Convert Transcript to Script
During my PowerShell scripting best practices at Techmentor last week I mentioned a function I had to convert a PowerShell transcript to a script file. Since there’s very little difference between an interactive session and a script, parsing the transcript can yield 80% or more of a script very quickly. I wrote such a function…