VB Petition

ADSI/WMI

rule1.gif (1558 bytes)

Manage Resources with WMI (VBPJ, July 2000)

   This is some pure demo code I wrote to illustrate some of the functionality you can achieve by using WMI. The UI is intentionally simplistic. 

rule1.gif (1558 bytes)

ADSI (and WMI) (VBits 2000, Feb 2000)

    The following three samples were presented at VBits 2000 in SF on 2/15/2000. I will post other code in this section as I come out with new samples.

    The first 2 file downloads are very short demos for ADSI and WMI. The third demo is a much larger piece of code which shows many common admin tasks (using ADSI and WMI) which will run under Windows 9x, NT 4.0 SP4+, and W2K.

    Note that ADSI and WMI come built-in for W2K, but you must download (and install) the SDK for each operating system for both ADSI and WMI if you are using NT 4.0 or Win9x. In fact, you must download the ADSI SDK even for W2K, since you will need to register two of the unsupported DLLs that are available only with the Resource Kit that comes with the ADSI SDK.

    While not a commercial application by any stretch of the imagination, it does cover a fairly broad path through NT admin tasks in a reasonably encapsulated format. It does *not* cover IIS or Exchange Server admin via ADSI.

rule1.gif (1558 bytes)

WMI Example for Detecting NICs

    The next example comes from the Ask The NT Pro site. It illustrates how to get information on all the NICs on your local system, which is much simpler than other methods available. It works on Win9x, NT 4.0, and W2k (assuming you have the correct version of WMI installed).