Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 26, 2005

Notable Problems with WMI and ADSI


RSS
Subscribe to Windows IT Pro | See More VBScript Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    When Good Scripts Go Bad

Notable Problems with WMI and ADSI
When several scripting experts talked about common scripting errors in VBScript files, they mentioned a few notable problems that can occur when using Active Directory Service Interfaces (ADSI) and Windows Management Instrumentation (WMI). According to these experts and articles from a variety of sources, here’s a brief look at some dangers to watch out for.

ADSI Faux Pas
Ethan Wilansky, a chief technologist for EDS in its Next Generation Technologies and Architectures practice, says, “When using ADSI automation interfaces, I've commonly seen incorrect case on the provider moniker.” Unlike most items in VBScript code, ADSI provider names (i.e., ADSI OLE DB, GC, IIS, LDAP, NDS, NWCOMPAT, and WinNT) are case sensitive.

WMI Watch List
When you’re using WMI in VBScript code and your code fails, keep in mind the following problems. As this list shows, sometimes a problem isn’t necessarily your doing:

  • If your machines are running Windows XP Service Pack 2 (SP2) and you have Windows Firewall enabled, you might receive the Remote Server Machine Does Not Exist or is Unavailable. 'GetObject' error message when your script tries to connect to a remote computer from WMI. To fix this problem, you have to make configuration changes on the remote computer you're trying to access. For more information about these changes, see the Windows Scripting Solutions article “Solving a WMI Remote-Connection Problem,” May 2005, InstantDoc ID 45822.
  • Some WMI read-only properties (e.g., the read-only properties in the Win32_ComputerSystem and Win32_OperatingSystem classes) don't generate error messages as they should. If your script tries to write to one of these read-only properties, the scripting engine doesn’t return an error, although the write operation failed. To learn workarounds for this problem, see the Windows Scripting Solutions article “Rem: Identifying and Verifying Writable Properties,” January 2003, InstantDoc ID 27340.
  • If your script is retrieving information from WMI’s Win32_QuickFixEngineering class, your script might hang because the WMI provider (cimwin32.dll) that services that class contains a bug. The problem is isolated to the Win32_QuickFixEngineering class and occurs only when using WMI 1.5 with Windows 2000. For more information about this bug, see “WMI Win32_QuickFixEngineering Queries Cause Winmgmt Process to Hang,” http://support.microsoft.com/?kbid=279225.
  • If your script is trying to use WMI’s Win32_Processor class to inventory the total number of physical processors installed in a server farm, WMI might report hyperthreaded processors as multiple processors. For more information about this problem, see the Windows Scripting Solutions article “Rem: WMI Isn’t Hyper-Thread-Aware,” November 2003, InstantDoc ID 40228.

End of Article



Reader Comments
Comment

davelwise January 15, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
No Jobs, No Excitement at Apple's Last Macworld Keynote

Apple CEO Steve Jobs made the right move in skipping out on his company's last appearance at Macworld: In a Tuesday keynote address at the conference, Apple had no interesting new products to sell, opting instead to spend mind-numbing amounts of time on ...

CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing