Welcome to MSDN Blogs Sign in | Join | Help

This is my old blog

It's all about causality

News

  • Yosi Taguri

    Nedstat Basic - Free web site statistics Personal homepage website counter
    Listed on BlogShares

I was afraid from WMI

Until I found Microsoft (R) Management Strongly Typed Class Generator - MgmtClassGen.exe

Microsoft (R) Management Strongly Typed Class Generator Version 1.1.4322.573
Copyright c Microsoft Corporation 1998-2002. All rights reserved.
MgmtClassGen <WMIClass> [options]

         /N <WMINamespace>               WMI namespace containing the class. Defaults to root\cimv2
         /O <ClassNamespace>             .NET namespace in which the class is generated
         /L <Generated Language>         One of the following. Defaulted to CS
                                                 CS - CSharp(C#)
                                                 VB - Visual Basic
                                                 JS - JScript

         /P <FilePath>                   Output file path
         /M <Machine>                    Remote computer to connect. Defaults to the local machine
         /U <User>                       User name
         /PW <Password>                  Password
         /?                              Displays this help screen

Example :
        MgmtclassGen Win32_Logicaldisk /L VB /N root\cimv2 /P c:\temp\logicaldisk.vb

You can find it under you sdk bin directory, so instead of figuring out the properties of the objects you get a strongly type object to work with.

Posted: Monday, April 19, 2004 7:47 PM by yosit
Filed under: ,

Comments

ISerializable said:

# April 20, 2004 5:38 PM

Paul's Imaginary Friend said:

# April 21, 2004 8:14 AM
New Comments to this post are disabled
Page view tracker