Set-IniValue without -section parameter

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

The Toolkit Forums General Set-IniValue without -section parameter

  • Author
  • Wolfgang_Z@Kardex
    Post count: 1

    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?

  • Jim
    Post count: 54

    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.