This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
(get-content "c:\temp\myfile.txt") | foreach { $_ + "#" }
When I run this line of code it adds the # to the end of the line, not the beginning. This text file has about 1,400 records and I need to add a # to the beginning of each line.
(get-content "c:\temp\myfile.txt") | foreach {"#" + $_ }
Grüße - Best regards PS:> (79,108,97,102|%{[char]$_})-join''