Code  8007200E – The Directory Service is Busy

Troubleshooting Code 8007200E – The directory service is busy
Kindly sent in by Chuck Mazie

Introduction to Error Code 8007200E

This error code, 8007200E occurs when you execute a VBScript.  My suggestion is that this is a time-out problem.

The Symptoms You Get 8007200E

The script does not execute as you hoped, instead you get a WSH error message. 

The Cause of Code 8007200E

For some reason the Active Directory service provider cannot return an answer.  The message means what it says ‘The Directory Service is Busy’.

Solutions

  • Try narrowing the scope of your script, for example run the command against one OU rather than the whole of Active Directory.
  • Try a manual walk-through using Active Directory Users and Computers, if necessary use the ‘Find’ command.   Does that time-out too?
  • Could a ‘Sleep’ command help to pause your script?

  ‡

Example Script for Code 8007200E
Kindly sent in by Chuck Mazie

The main use of this script is to see the sort of code that may result in error code 8007200E, note the large scope.

Const ForReading = 1
Const ForWriting = 2 < BR >
Dim objFSO, objCompFile, objDCFile, objDomain, objComp, objNTComp
Dim strCompFile, strDCFile
Dim strDomain, strDCList Dim intSecInADay, intAccountAge

strCompFile = "C:\Temp\InactivePCs.txt"
strDCFile = "C:\Temp\DCList.txt"
strDomain = "MyDomain"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCompFile = objFSO.OpenTextFile(strCompFile, ForWriting, TRUE)
Set objDCFile = objFSO.OpenTextFile(strDCFile, ForReading)
Set objDomain = GetObject("WinNT://" & strDomain)
objDomain.Filter = Array("Computer")
strDCList = objDCFile.ReadAll()
intSecInADay = 60 * 60 * 24
intAccountAge = 90

For Each objComp In objDomain
Set objNTComp = GetObject("WinNT://" & strDomain & "/" & objComp.Name & "$")
If (objNTComp.PasswordAge > intSecInADay * intAccountAge) Then
If InStr(1, strDCList, objComp.Name, vbTextCompare) = 0 Then
‘Call objDomain.Delete("Computer", objComp.Name)
objCompFile.Writeline objNTComp.Name & "– computer account has been deleted"
End If
End If
Next

Solarwinds Free WMI MonitorGuy Recommends: WMI Monitor and It’s Free!

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 additional help?

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