WMIC throwing an Description = exception occured when trying to retrieve users in table format

1

I'm trying to extract list of the users (name and description fields) into a text file. This used to work fine until recently. This is a Windows 8.1 64bit machine which is being used as server and has a few thousand user accounts.

The command I'm running is:

wmic USERACCOUNT GET Name,FullName

Recently it started throwing and error (with no output beyond before or after):

ERROR: Description = Exception occurred.

It used to output the information in a table format which I used to pipe into a text file. After searching the internet I found a suggestion to try and use the list format instead of the default table format, so I tried:

wmic USERACCOUNT GET Name,FullName /format:list

This seems to work but the output is all wrong in the list format.

Does anyone know why it suddenly could start throwing an error in the table format and how to get it working in the table format again?

UPDATE: When i use the /trace on switch with the table format I get the following (at the end of a long list of successes).

SUCCESS: CoCreateInstance(CLSID_FreeThreadedDOMDocument, NULL, CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument2, -)
Line:    206 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXMLDOMDocument::loadXML(-, -)
Line:    237 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: CoCreateInstance(CLSID_XSLTemplate, NULL, CLSCTX_SERVER, IID_IXSLTemplate, -)
Line:   3246 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: CoCreateInstance(CLSID_FreeThreadedDOMDocument, NULL, CLSCTX_SERVER,IID_IXMLDOMDocument2, -)
Line:   3269 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXSLDOMDocument2::put_async(VARIANT_FALSE)
Line:   3281 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXSLDOMDocument2::load(L"C:\Windows\system32\wbem\\texttable.xsl", -)
Line:   3296 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXSTemplate::putref_stylesheet(-)
Line:   3310 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXSTemplate::createProcessor(-)
Line:   3322 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

SUCCESS: IXSProcessor::put_input(-)
Line:   3359 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

FAIL: IXSProcessor::tranform(-)
Line:   3400 File: admin\wmi\wbem\tools\wmic\formatengine.cpp

ERROR:
Code = 0x80020009
Description = Exception occurred.
Facility = Dispatch
wmic
asked on Stack Overflow Sep 2, 2014 by rboy • edited Sep 2, 2014 by rboy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0