EDIT: So I managed to come up with this code and for the most part it works flawlessly. The problem I am trying to figure out is how to increment $a for each line. I would like an output like this, but I am trying to figure out how to increment $a.
I 1 like bat scripting!
I 2 like vbs scripting!
I 3 like powershell scripting!
$a=0
$b= Get-Content -Path 'C:\Users\G\Desktop\2.txt' | ForEach-Object { "I $($a+1) like {0} scripting!" -f $_}
$(
$b | ForEach {
$b[$a]=" $($b[$a]) "
$a++
}
$b
) *>&1 > "C:\Users\G\Desktop\3.txt"