Closed Juvls closed 6 years ago
What behavior would you expect? An array? Under the Section?
INI files do not support lines without a delimiter.
I would expect to see them under the array/section modules so when I export the .ini file with my change, it does include everything.
Yes it is not very standard for a INI file and I found an alternative to do it, so maybe it's not worth fixing! :)
$iniContent = Get-Content $iniFile |
%{
$_ -replace 'string_to_search', 'new_string'
}
$iniContent | Out-file $iniFile
I am closing this, as I don't see any benefit for the module supporting this use case. At least for now.
Hi,
I was trying to use your module to update a nagios conf file, see below an example, and I found out if the "=" is missing (e.g. NRPEListener.dll, CheckWMI.dll) in the .ini file, it is going to be ignored with get-iniContent
Thanks for your module!