I have a .txt file that has hundreds of machine names. one per line. I need to add our domain name to the end of each machine.
from: PC01234
to: PC01234.Acme.com
I've tried the Add-Content but it did not work.
get-content "C:\Temp\3.txt" | foreach-object {add-content C:\temp\3.txt "$_ .Acme.org"}
It either does not work or it adds a space in-between the end of the computer and the period.
Is add-content the wrong choice for this task?