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
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

VMware and the Future of Virtualization

What's next for virtualization and business IT? Windows IT Pro senior editor Jeff James speaks with VMware President and CEO Diane Greene on the future of virtualization technology. ...


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

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events 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.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

IT Connections
Dive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities.

Attention User Group Leaders...
Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes and add Windows IT Pro & SQL Server Mag articles alongside your own message!.

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Get SQL Server 2008 at WinConnections
Don’t miss Microsoft Exchange and Windows Connections conferences, the premier events for Microsoft IT Professionals in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.



Interested in Email Encryption?
Read about the advantages of identity-based encryption in this free report.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
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 Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing