Nuacht

Your history probably contains commands that you do not want to include in the script. The other thing that you need to know is that PowerShell allows you to map a command's output to a variable.
When writing PowerShell scripts, in a perfect world, we'd all just use cmdlets and functions. After all, the batch file days are behind us! Unfortunately, that's not always possible or even the best ...