1 of 1 people found this helpful
I've always done this directly in SQL, there is a pretty elegant solution to this and a number of related problems in a series of posts by user alexslv
In short you create an additional table where you list all of the sites and the properties that would be related to them, such as addresses, POC, GPS coords, time zone offsets, etc
Alex has a series of scripts in the posts to reference that table to automatically do things like setting up your dependency trees, placing objects on the worldwide map, and setting custom properties.
Building this out as a script in powershell feels kind of clunky to me for this use case since you really are trying to sync up two tables of data anyway. You could probably still use powershell and the api if you wanted to point it at a .csv and use that as the source of your sites array but I'm weaker in PS than SQL, has the benefit of being easier to access for people who aren't comfortable in SQL, but on the other hand you risk having someone access it and screw up your tables .
I think I am inclined to agree with you about doing this in SQL. I actually did look a some of the posts by alexslv, but didn't see the entire series, with the extra bits of info in there I do believe I have found what I need to move forward with this confidently. So thanks :-)