Advertisement
Dennisaa

PowerShell - update web.config 2

May 18th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $webConfig = "C:\temp\applaunch.exe.config"
  2. $xml = [xml] (Get-Content $webConfig)
  3. $systemNet = $xml.configuration.configSections.sectionGroup | Where-Object {$_.name -eq "system.net"}
  4. ($systemNet.section | Where-Object {$_.name -eq "authenticationModules"}).type = "Just a test 2"
  5. $xml.Save($webConfig)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement