It is a logon script... or it is an admin script... can't be both.

A logon script is what every user runs at logon, the script runs under the users security rights. (and I suspect that is what is causing some of your problems)

An admin script is normally ran only when needed, ran by an administrator, with all rights and privileges that being the admin entails.

I personally can’t see the need to pull the .officelocations field on every logon... doesn’t mean that there is not a need for this, just means that i can't see it.

You say you are trying to populate a database with this information. A simple admin script, ran when ever you need to refresh the database would be my preferred method, hell you could even schedule it to run on a regular basis if you need frequent updates.

Bryce