Computer Performance, VBScript, Logon Scripts, Error Codes

Code Error 80040E14 -
Error: One or more errors occurred during processing of command

Troubleshooting Code 80040E14 - One or more errors occurred during processing of command

Introduction to Error Code 80040E14

This error code, 80040E14 occurs when you execute a VBScript.  You are probably using a WSH method to connect to LDAP.  My wild guess is that there is extra speech mark, or there is something fishy with one of your quotation marks.One or more errors occurred during processing of command Code 80040E14

The Symptoms You Get

The script does not manipulate the Active Directory object as you had hoped, instead you get a Windows Script Host error message.  The probably scenario is that you are trying to manipulate an LDAP object.

The Cause of Code 80040E14

The most likely cause is incorrect reference to the domain in your LDAP command.  Check lines which reference Active Directory, for example: LDAP://domain.

Another cause of the error is that the WMI service is not running on the machine where you execute the VBScript.  To check the state of your WMI service see here

Table does not exist. Error 80040E37
Invalid Syntax. Error 800401E4

The Solutions

Check the Line: number in your script that references the 'Provider'.  If necessary, work back for previous occurrences of LDAP.  Incidentally, Char 1: often lies! it just means that the whole line will not execute.

In the case of runtime errors, you can use this work around.  Add this line: On Error Resume Next

Engineer's Toolset v10Guy Recommends: SolarWinds Engineer's Toolset v10

This Engineer's Toolset v10 provides a comprehensive console of 50 utilities for troubleshooting computer problems.  Guy says it helps me monitor what's occurring on the network, and each tool teaches me more about how the underlying system operates.

There are so many good gadgets; it's like having free rein of a sweetshop.  Thankfully the utilities are displayed logically: monitoring, network discovery, diagnostic, and Cisco tools.  Try the SolarWinds Engineer's Toolset now!

Download your fully functional trial copy of the Engineer's Toolset v10

Example of a VBScript with Error 80040E14

In this instance, you need to pay close attention to the speech marks.  Note the error is actually on line 15: it should be 'LDAP:// & strDomain ' .  One pair of single quotes.  Not 'LDAP:// ' & strDomain '  with extra single quote. 

VBScript for error codesI just could not get the script to work with the strDomain variable...... Until I mastered binding to LDAP.

Example Script 1

' Get Domain name from RootDSE object.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDomain = objRootDSE.Get("DefaultNamingContext")

WScript.Echo strDomain ' This is Extra line Guy put in to test

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "Select printerName, serverName from " _
& " 'LDAP://' & strDomain ' where objectClass='printQueue'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute
Do Until objRecordSet.EOF
Wscript.Echo "Printer Name: " & objRecordSet.Fields("printerName").Value
Wscript.Echo "Server Name: " & objRecordSet.Fields("serverName").Value

Recommended: Solarwinds' Permissions Analyzer - Free Active Directory ToolFree Permissions Analyzer for Active Directory

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

Think of all the frustration that this free SolarWinds utility saves when you are troubleshooting authorization problems for user's access to a resource.  Give this permissions monitor a try - it's free!

Download SolarWinds' Free Permissions Analyser - Active Directory Tool

Example Script 2 - Kindly Sent in by Steven McCarty

Option Explicit
'* On Error Resume Next is enabled for the WScript.Echo to show Err.Number
On Error Resume Next

'* Dimension variables
Dim objCommand, objConnection, objRecordSet, strLDAPQuerySearch, strLDAPQueryReturn, strLDAPQueryScope, strLDAPQueryCommandText
'Initialize Objects
Set objCommand = CreateObject("ADODB.Command")
Set objConnection = CreateObject("ADODB.Connection")

objConnection.Provider = "ADsDSOObject"
objConnection.Open "ADs Query"

'* Normally, I use the extract query out of ADUC, but
'* forget that ADUC places a wrapper around the query.
'* This query will fail with 80040E14
strLDAPQuerySearch = "(&(objectCategory=group)(objectClass=group)(dLMemSubmitPerms=*))(!(dLMemSubmitPerms=A 'Test' Group))"
WScript.Echo strLDAPQuerySearch
strLDAPQueryReturn = "sAMAccountName, cn, ADsPath"
strLDAPQueryScope = "subtree"
strLDAPQueryCommandText = "<LDAP://" & GetObject("LDAP://RootDSE").Get(("defaultNamingContext")) & ">;" & strLDAPQuerySearch & ";" & strLDAPQueryReturn & ";" & strLDAPQueryScope
objCommand.ActiveConnection = objConnection
objCommand.CommandText = strLDAPQueryCommandText
objCommand.Properties("Page Size") = 99
Set objRecordSet = objCommand.Execute
WScript.Echo Hex(Err.Number)

'* If we place the same AND wrapper around the query,
' as ADUC does, the query will not fail
strLDAPQuerySearch = "(&" & strLDAPQuerySearch & ")"
WScript.Echo strLDAPQuerySearch
strLDAPQueryCommandText = "<LDAP://" & GetObject("LDAP://RootDSE").Get(("defaultNamingContext")) & ">;" & strLDAPQuerySearch & ";" & strLDAPQueryReturn & ";" & strLDAPQueryScope
objCommand.CommandText = strLDAPQueryCommandText
Set objRecordSet = objCommand.Execute
WScript.Echo Hex(Err.Number)

Start and Stop the winmgmts service

Navigate to the command prompt.

net stop winmgmt WBEM Directory 80041001

Using Windows Explorer, navigate to %systemroot%\system32\wbem directory and delete the Repository directory. By default, the repository folder is located in the C:\Windows\system32\wbem directory.
Switch to Command Prompt window, and type:
net start winmgmt

Re-Register the DLLs

The .DLL and .EXE files which WMI uses are located in %windir%\system32\wbem.  This is how you re-register all the .DLL and .EXE files in the WBEM directory. To re-register the WMI components, run the following commands at the command prompt:

cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer

Re-Install WMI files

If you suspect that the WMI files are damaged, then you could re-install them from the Windows Server 2003 or XP CD.  Here is the nifty command:

rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf

I thank Riaan, Shane and Ramesh for supplying this extra information on WMI Errors in general and 80041xxx in particular.


See More Windows Update Error Codes 8004 Series

Error 80004005 Unspecified Error   • Error 80041021   • Error 80041001   • Error 80041002

Error 80048820   • Error 8004100E   • Review of SolarWinds Application Monitor (SAM)

Error 80040E14   • Error 80040E37   • Error 80041006   • Error 80041006

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:

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



Custom Search

Site Home

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

Author: Guy Thomas Copyright © 1999-2017 Computer Performance LTD All rights reserved.

Please report a broken link, or an error to: