Geocoding Longitude and Latitude using PowerShell and the Google Maps API

So, I ran into an issue where I needed to convert a ton of addresses to map points for use with a database.  It’s not something that I have to do too often, but I decided to look through the documentation for Bing, Google, OpenStreet, and MapQuest API’s.

After playing around with them all, it was just easier to use the Google API if I didn’t need to make too many calls at one time.  If I needed to make a bunch of calls (or I needed to make them repeatedly instead of just once), I would have went with Bing since it’s an easier API (IMHO).

I originally wrote this as part of a script, but then realized that it would work so much better as a function, so it was back to the drawing board and coding it as a function instead.  Overall, I’m pretty pleased with myself with how it works, but the true test is to have it out in the wild.  So without further ado, here’s the script.

Leave a Comment