Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell: delete all connection string entries in application.config

$
0
0

Hi,

In powershell I'm looking for a way to delete the connection strings in a application.config.  I want to delete all of them, and then add my own with my own ip/db names through variables.  I do not wish to change just the existing ones, I wish to delete them all and add new ones.  Adding them doesn't look to be to difficult, deleting them seems to be where I'm stuck.

Any help is appreciated.

thx

Application.config:

<connectionStrings><add name="LISDB" connectionString="Data Source=.;Initial Catalog=DB_TEST_LIST;Integrated Security=True;Min Pool Size=10;Network Library=dbmssocn" providerName="System.Data.SqlClient" /><add name="PARDB" connectionString="Data Source=.;Initial Catalog=DB_TEST;Integrated Security=True;Min Pool Size=10;Network Library=dbmssocn" providerName="System.Data.SqlClient" /></connectionStrings><connectionStrings>


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>