Replace app.config item node value in powershell

Question:

Having the following app.config:

I want to replace the setting that has ‘filepath’ key with a new value (by replacing ‘D:\Data..’ in this case). The new value should be passed as a parameter to the powershell script. Thanks

Answer:

Update based on the comment:

===========================================================================================

OLD ANSWER

or

Source:

Replace app.config item node value in powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply