Monthly Archives: August 2009

  • 6

Revised: INI File #PowerShell Functions

Although alternatives are around for years now, I still stumble upon those old school INI files. Inspired by a small piece of code that I found recently at stackoverflow.com I have built a small PowerShell module that provides the following functions:

  • Import-Ini – read an INI file’s entire content into memory, structured as hashtable
  • Export-Ini – write the hashtable back to file
  • Remove-IniCategory – remove a category from an INI file
  • Remove-IniKey – remove a key from an INI file
  • Get-IniKey – return value of an INI file key
  • Set-IniKey – set a key in an INI file