正規表現スクリプト関数を使用して、これら 2 つのフィールド (クライアントと環境) を更新したい
<authentication mode="Forms">
<forms name="AIR.client.environment.value" loginUrl="Login.aspx" protection="All" timeout="30" />
</authentication>
私が持っている機能
$regex_clientname = new-object System.Text.RegularExpressions.Regex("client=.*", [System.Text.RegularExpressions.RegexOptions]::IgnoreCase);
$regex_enviorenment = new-object System.Text.RegularExpressions.Regex("environment=.*", [System.Text.RegularExpressions.RegexOptions]::IgnoreCase);
$root.SelectSingleNode("//authentication/forms/@name")."#text"=$regex_enviorenment.Replace($regex_clientname.Replace($root.SelectSingleNode("//authentication/forms/@name")."#text", $CLIENT),$ENV);
しかし、それは更新されていません..私は助けが必要です