Adding Application Settings to a web site

Welcome Forums General PowerShell Q&A Adding Application Settings to a web site

  • This topic has 1 reply, 2 voices, and was last updated 1 year ago by
    Senior Moderator
Viewing 1 reply thread
  • Author
    • #175090
      Topics: 1
      Replies: 0
      Points: -8
      Rank: Member


      I have been working on trying to get PowerShell to add information to the “Application Settings” for a web site.  For the last week, I have been looking into this but there is not a lot of information on adding the information to the section.

      I have been able to list out all the values:

      `Get-WebConfigurationProperty -pspath ‘IIS:\Sites\Default Web Site’ -filter “/appSettings/add” -name * | ft`

      I have been able to change a value:

      `Set-WebConfigurtionProperty -pspath ‘IIS:\Sites\Default Web Site’ -filter “/appSettings/add[@key=’MyValue’]” -name value -Value ‘1’`

      But I have not been able to get the Add-WebConfigurtionProperty to allow a key and value to be placed in the site.  I have tried many different ways to get this to work and looked for references for the Add-WebConfigurationProperty dealing with the key and values but I have not found anything has gotten me over the hump.

      Thank you.

    • #175342
      Senior Moderator
      Topics: 9
      Replies: 1309
      Points: 4,781
      Helping Hand
      Rank: Community Hero

      Can you share us the code you attempted. This will help us in understand better. May be it could be a small miss somewhere.

Viewing 1 reply thread
  • The topic ‘Adding Application Settings to a web site’ is closed to new replies.