Set-IniValue without -section parameter

//Set-IniValue without -section parameter
Set-IniValue without -section parameter 2017-10-23T12:44:13+00:00

The Toolkit Forums General Set-IniValue without -section parameter

  • Author
    Posts
  • Wolfgang_Z@Kardex
    Participant
    Post count: 1
    #2381 |

    Hello,
    we have an ini File without a section in this file.
    When i donĀ“t use the parameter -section i will get an error.
    Is it possible to use set-inivalue without -section?
    KR
    Wolfgang

  • Jim
    Participant
    Post count: 45

    It doesn’t seem like this is possible. I tried changing the function parameter $Section so it wasn’t mandatory, and when I did that, it created an empty section- []. Does it matter where in the file the entry is? Could you just use add-content to add it to the end of the file?

    Add-Content -Value “nrtest” -Path “C:\windows\win.ini”

You must be logged in to reply to this topic.