Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- powershell weirdly encodes ampersands when I try to set the value to an xml attribute
- function set-connectionstring {
- param($path, $name, $value)
- $settings = [xml](get-content $path)
- $setting = $settings.configuration.connectionStrings.add | where { $_.name -eq $name }
- $setting.connectionString = "$value"
- $setting.providerName = "System.Data.SqlClient"
- $resolvedPath = resolve-path($path)
- $settings.save($resolvedPath)
- }
- [System.Reflection.Assembly]::LoadWithPartialName("System.web")
- [System.Web.HttpUtility]::HtmlDecode(""")
Advertisement
Add Comment
Please, Sign In to add comment