Repository navigation
Home
Tim Dunn edited this page Sep 11, 2018
·
2 revisions
GetSet-IniFile.psm1 allows PowerShell to programmatically examine and edit INI and REG files.
INI files do not have a published standard, such as an IETF RFC. Various parsers implement their own business logic for certain syntatic elements.
| Data | Notes |
|---|---|
| Comments | In all INI files, the semi-colon character, ;, at the first column of the line denotes a comment. Additionally, this PSModule also treats the hash character, #, and a pair of forward slashes// as comment delimiters, but only at (or starting at, in the case of //) the first column of the line. |
| This PSModule does not support inline comments, such as following a key-value pair. The comment string will simply be captured as part of the value. | |
| Whitespace | Leading and trailing whitespace are not considered part of either the key or the value. They are captured so generated INI files will maintain the same spacing, but the [TimDunn.IniRecord] object's .Key and .Value property values will not contain leading nor trailing whitespace. |
| Key/Value Pairs | This PSModule supports empty values. The [TimDunn.IniRecord] object will still have the .Key value populated, but the .Value property value will be $null. |