Additional file for data


I’m creating a fairly large script, which needs to pull in Name, Dates, Site Location etc from a external file. What would be the best way to store this information in an external file. i know i can use psd1, Json, XMl, but not sure whats best.

The values for the would have nested values, for example:

      Name = London
      Offices = "Office 1","Office 2","Office 3"
      Subnet = "",""




Hi Tommy,
It totally depends on the amount of data you want to store. If its too large looking at something like SQL (MS SQLExpress) would help. Also because you mentioned you have nested data.

Normally CSV can be a quick and easy way to store data. But there are limitations when it comes to nested and Sub information.

You can also use XML as its more extensible. but this is still a flat file and can sometimes grow out to be too large
All CSV, JSON, XML have native Powershell export and import commands. So this would be easy.

As mentioned if you go down the SQL path, there is a free E book by Don Jones which can help you get an idea to set this up

there is also a powershell module you can download from the gallery if you don’t want to go the whole 9 yards :slight_smile:

Hope this help