【发布时间】:2013-05-30 03:09:31
【问题描述】:
我需要尝试更新 web.config 文件以仅更改 web.config 的 IP 地址 我已经包含了我正在寻找 powershell 来编写更改脚本的代码部分。
<connectionStrings>
<add name="connectionString" connectionString="provider=SQLOLEDB;Server=192.168.1.100;database=sample;Trusted_Connection=Yes" providerName="System.Data.OleDb" />
<add name="sqlConnectionString" connectionString="Data Source=192.168.1.100;Initial Catalog=sample;Trusted_Connection=Yes" providerName="System.Data.SqlClient" />
</connectionStrings>
我想要一个非常简单的解决方案 只需更新 ServerIP 地址。
任何人都知道使用 PowerShell 执行此操作的简单方法。
【问题讨论】:
标签: powershell web-config connection-string powershell-3.0