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 = "126.96.36.199","188.8.131.52"
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.