Add and remove lines in text based config files with PowerShell

7. April 2017

blog.feldmann.io

PowerShell Version: >4 
Modules: none

I want to take some text file and look for a specific line, then delete that line and add some other line at the end of the file. Here’s how I made it work:

Share on LinkedIn
Linkedin
Share on Google+
Google+
0Share on Reddit
Reddit
0Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Email this to someone
email
Print this page
Print
#PowerShell
1 Comment
29. June 2017 @ 11:11

This is exactly what I was looking for. Works great! Many thanks for sharing.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


*