Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

ChangeConfig.ps1 614 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. $configFile = $args[0]
  2. Write-Host "Adding iisnode section to config file '$configFile'"
  3. $config = New-Object System.Xml.XmlDocument
  4. $config.load($configFile)
  5. $xpath = $config.CreateNavigator()
  6. $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']")
  7. $iisnodeElement = $parentElement.SelectSingleNode("//section[@name='iisnode']")
  8. if ($iisnodeElement) {
  9. Write-Host "Removing existing iisnode section from config file '$configFile'"
  10. $iisnodeElement.DeleteSelf()
  11. }
  12. $parentElement.AppendChild("<section name=`"iisnode`" />")
  13. $config.Save($configFile)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...