diff --git a/index.ps1 b/index.ps1
index 1ed0967..9658698 100644
--- a/index.ps1
+++ b/index.ps1
@@ -1,10 +1,15 @@
# Powershell script for Windows 10 and above to index the TMDB JSON file.
+if (![System.IO.File]::Exists('tmdb_data/tmdb_solr.json')) {
+ echo 'Extracting TMDB archive'
+ Expand-Archive -DestinationPath tmdb_data 'tmdb_solr.json.zip'
+}
+
# delete (or wipe) the tmdb index and reindex
-Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -Body '*:*' -Content-type 'text/xml; charset=utf-8'
+Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -Body '*:*' -ContentType 'text/xml; charset=utf-8'
Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -Body '' -ContentType 'text/xml; charset=utf-8'
-$data = Get-Content 'tmdb_solr_file.json'
+$data = Get-Content 'tmdb_data/tmdb_solr.json'
Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -ContentType 'application/json' -UseBasicParsing -Body $data