Troubleshooting Code 80072030 - There is no such object on the server
A wild guess, there is a mistake in the reference to your OU. However, to hedge my bets, it could be any
Active Directory object that causes the error 80072030 : 'There is no such object on the server'
Introduction to error Code 80072030
This is an easy error code to troubleshoot. Code 8007xxxx indicates a
problem with Windows, or Active Directory. For example, you are trying create
a child object inside an OU, but that parent OU does not exist.
The Symptoms you get 80072030
The script does not execute as you
hoped, instead you get a WSH error message.
One possibility is that you are trying to create an Active Directory object but there is no parent
container, example misspelled OU.
The Cause of Code 80072030
Check Active Directory User's and Computers, perhaps there is no such
parent OU, therefore you cannot create the child OU.
The Solutions
Use Active Directory Users and Computers to check that the OU exists. Create the
parent container object so that the
new child object will have a 'home'. Note: The error is in Line 5. In
the case of runtime errors you can use this work around. Add this line:
On Error Resume Next.
The OU specified by strContainer is mis-spelt, or the comma is missing. Such errors are common in scripts with very long Active Directory paths. strContainer = "OU=Cowbridge ,"
' Set AccountControl.vbs ' Example VBScript to enable user accounts in a named OU ' Author Guy Thomas http://computerperformance.co.uk/ ' Version 1.7 - March 21st 2004 '
-----------------------------------------------------------------' Option Explicit Dim objOU, objUser, objRootDSE Dim strContainer, strLastUser, strDNSDomain, intCounter, intAccValue Set objRootDSE
= GetObject("LDAP://RootDSE") strDNSDomain = objRootDSE.Get("DefaultNamingContext") strContainer = "OU=Cowbridge ," intAccValue = 512 strContainer = strContainer & strDNSDomain set objOU
=GetObject("LDAP://" & strContainer ) intCounter = 0 For each objUser in objOU If objUser.class="user" then objUser.Put "userAccountControl", intAccValue objUser.SetInfo
intCounter = intCounter +1 strLastUser = objUser.Get ("name") End if next WScript.Echo intCounter & " Accounts Enabled. Value " _ & intAccValue WScript.Quit
' End of VBScript Example
Try
a different solution, download SolarWinds ipMonitor
Here is my thinking,
ipMonitor will give you valuable data about your network and servers.
This extra information just may unlock the solution to your error code.
One more thing, sometimes when troubleshooting you go around in circles;
therefore if you try a different, but related approach, you may just crack the
problem.
Free Download
of SolarWinds ipMonitor
Their topics and material are ideal for getting you started with VBScript. The
videos are easy to follow and you can control the pace. Try their free demo material and then see if you want to buy the full package.
See more about VB Script Training CD.
The 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.