locked
Searching INI files - to select-string or not to select-string? RRS feed

  • Question

  • I'm looking for a means of reviewing remote INI files to verify settings within certain sections.

    I've found I can use select-string to locate the sections in the remote files, but I want to, once I find the sections, return the information between that section and the next.

    so if I used this data 

    [SECTION NAME]

    blahblah = 103

    blah blah blah blah 

    blah2blah=true

    [NEXT SECTION NAME]

    I'd want it to return the three lines below it (before the next section name).

    Additionally, if you can tell me how to include a bracket in the search (-pattern "[SECTION NAME]" doesn't work!!) I'd appreciate it.

    Thanks!

    Ben

    • Moved by Bill_Stewart Monday, March 7, 2016 9:44 PM Abandoned
    Thursday, January 14, 2016 9:33 PM

Answers

All replies