How to Replace Multiple Strings in a File using PowerShell
Replace the Data Source and Initial Catalog values of WebConfig.XML
Content of XML file
<Configuration ConfiguredType=”Property” Path=”\Package.Connections[ConnStaging].Properties[ConnectionString]” ValueType=”String”>
<ConfiguredValue>Data Source=localhost;Initial Catalog=Stage;Integrated Security=SSPI; Connection Timeout = 10</ConfiguredValue>
</Configuration>
PARAM(
[String]$DatabaseName='DCTarget',
[String]$XML='c:\webconfig.XML',
[String]$DatabaseServer='DataCenterDB01')[string]$db...
2015-03-13
15,440 reads