Automating Maxmind GeoIP downloads on Windows

Sure – there’s lots of snippets for automating the GeoIP database downloads (with your Maxmind subscription) for your *nix boxes, but not many for Windows.

 

Here’s a simple PowerShell script that you can pop into your favourite job scheduler application (Batch Job Server, JAMS Scheduler, or *ugh* Windows Task Scheduler)

 

It’s pretty rough and not much error handling (I wrote it quickly) but it does the job to;

 

1. Download the latest GeoIP file

2. Unextract the double-zipped tar.gz file

3. Copy the unextracted .dat file to a location for you to use

 

(We use this in a webfarm environment, which is replicated to each web server via Microsoft’s DFSR)

 

It’s posted here on GitHub, so feel free to make improvements and collaborate 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s