Debugging Tools and Techniques

In an ideal world, no scripts would ever have bugs. There would be no typing errors, no conceptual misunderstandings, and everything would work seamlessly all the time. Sadly, such a picture is rarely reality. Inevitably, complex scripts do not work immediately as intended, either owing to an error on the part of the scripter or, occasionally, because the system being scripted is itself problematic or badly documented. This section considers some of the common bugs that recur when writing scripts that use WMI and suggest some tools and techniques that can be used to combat them. Many bugs, particularly those involving syntax errors and typing mistakes, are not WMI-specific but crop up generally when programming ...

Get Windows Management Instrumentation (WMI) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.