Wednesday, November 4, 2015

Working with INI files in PowerShell

I recently had a requirement to construct a file that would store information that I could then use to easily read back the information to construct a directory structure on the file system.

I did not want to construct an elaborate XML document to store this information, so the obvious choice became an .ini file, however, I was not sure if PowerShell had built-in support for INI files.

Well, fortunately, a PowerShell scripting expert provided the functionality for reading INI files for us!

http://blogs.technet.com/b/heyscriptingguy/archive/2011/08/20/use-powershell-to-work-with-any-ini-file.aspx

You can download his PowerShell script from here: https://gallery.technet.microsoft.com/scriptcenter/ea40c1ef-c856-434b-b8fb-ebd7a76e8d91

No comments:

Post a Comment