Ever tried to run a VBS scripts that queries Active Directory in another domain or from a workstation that is not a domain member? Than you have probably seen this error before:

Error MessageError MessageError Message

This is because the default settings for Chasing referrals is set to ADS_CHASE_REFERRALS_NEVER.

Add the line below to your script to make it work.

So in a script it would look like this: