Computer Performance, Windows 2003, Exchange 2003, Logon Scripts

Guy recommends :
Free Solarwinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


Guy's Review of
Computer Utilities

 1) FreePing
 2) Wake-on-LAN
 3) Xobni
 4) PuTTY
 5) WMI Monitor
 6) BgInfo
 7) Net-SNMP
 8) IP Address Tracker
 9) DNS Stuff
10) WinDiff Compare


Error Code  8007202B - A referral was returned from the server

Troubleshooting Code 8007202B - A referral was returned from the server

Introduction to error Error Code 8007202B

This error code, 8007202B occurs when you execute a VBScript.  My suggestion is that there is a typo in the domain name reference in your script.  Error messages beginning 8007xxxx mean there is an external problem with Windows rather than syntax in the VBScript itself.

The Symptoms You Get 8007202BCode 8007202B A referral was returned from the server

The script does not execute as you hoped, instead you get a WSH error message.  One possibility is that you are using a WSH object and the LDAP reference: dc = value which has been misspelled.

The Cause of Code 8007202B

Your VBScript contains an illegal dc= domain reference, probably a typing mistake, an extra letter.  Check the spelling of your LDAP objects.  In the example the Line: 6 is where the error is to be found.

Ideas for Solutions

A wild guess is that you copied the script, but did not change the domain references which are hard-coded in the script.

Check the spelling of your LDAP objects.  Look for clues particularly the Line: number.  In this case it Char: 1 is not to blame.  When none of the line can execute, the error gets charged to the first character. In the case of runtime errors if you are desperate then use this work around.  Add this line: On Error Resume Next

  ‡

Example 1 - Add the name of your domain control server.

Bryan Fuehrer writes in with a great idea; add the name of your domain controller to the script. Instead of a command such as:

Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name from 'LDAP://DC=CEC,DC=root,DC=xyz,DC=com' " _
& "Where objectClass='group'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute

Try this, add the name of the domain contoller, and solve Code 8007202B errors

Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name from 'LDAP://bigserver/DC=CEC,DC=root,DC=xyzd,DC=com' " _
& "Where objectClass='group'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute

Error 8007202B

Note that in Bryan's example the source is Provider, whereas in my original example the source was (null).  My point is always check your error message carefully.  In this instance there is a different solution depending on what Source: says.  Incidentally, the first 11 lines of Bryan's script are not shown that is why the error message reports line 14 (not line 3).

Free Permissions Analyzer for Active DirectoryGuy Recommends: Permissions Analyzer - Free Active Directory Tool

I like the Permissions Monitor because it enables me to see quickly WHO has permissions to do WHAT.  When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!

Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource.

Download Permissions Analyser - Free Active Directory Tool

Example 2: Typo in the DC=

Error dc= c0p (Where did that zero come from?)

It should be dc= cp

'Script to Create a new Contact account in the BulkImport OU
'Script created by Guy Thomas
'Feel free to adapt names

Set objOU = GetObject("LDAP://OU=BulkImport, dc=c0p, dc=com")
Set objUser = objOU.Create("contact", "cn=SaleMen")
objUser.SetInfo

Wscript.Echo "Success new Contact - Remember F5"

Corrected Version

'Script to Create a new Contact account in the BulkImport OU
'Script created by Guy Thomas
'Feel free to adapt names

Set objOU = GetObject("LDAP://OU=BulkImport, dc=cp, dc=com")
Set objUser = objOU.Create("contact", "cn=SaleMen")
objUser.SetInfo

Wscript.Echo "Success new Contact - Remember F5"

Check all the domain references in your script.  If necessary check ADUC or the System Properties, Computer name tab for the correct domain name.

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.  Fortunately, Solarwinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor


Do you need extra help?

For interpreting the WSH messages check Diagnose 800 errors.

For general advice try my 7 Troubleshooting techniques

Give something back?

Would you like to help others?  If you have a good example of this error, then please email me, I will publish it with a credit to you:

 

Download my Logon Script eBook for only $6.25

Logon ScriptThe extra features you get in your eBook include, more pages full of detailed examples.  Also, ten 'how to...' sections, with screen shots showing which menus to use.  Go for Guy's eBook - and get a printable version with copy enabled and no expiry date.

  Jumbo Script 7 Package

If you like this page then please share it with your friends

 


 *


Custom Search

Solarwinds Network Device MonitorSolarwinds' Free Network Device Monitor

Thus utility makes it easy to check the health of a router or firewall.  Check the real-time performance and availability statistics for any device on your network.

Get started with an extensive collection of "out-of-the-box" monitors for popular network devices.  Download your free Network Device Monitor

 

Home Copyright © 1999-2012 Computer Performance LTD All rights reserved

Please report a broken link, or an error.