Scripting Access to WMI

Scripts can access all WMI classes for hardware and software objects. Windows Script Host (WSH) scripts can perform operations on file system objects, manipulate network printers, or change environment variables. You can find a variety of administrator tasks and brief guidance on how to accomplish them in WMI at WMI Tasks for Scripts and Applications. For more information and examples, see the TechNet ScriptCenter Script Repository.

If you are new to scripting or to WMI-specific scripting, see the TechNet ScriptCenter section Getting Started.

With the Scripting API for WMI, you can develop quick, simple scripts or complex applications. Scripting gives you the same capability of getting information or of configuring most objects in an enterprise as you would have through a C++ or C# application. For more information, see Scripting in WMI.

You cannot write a WMI provider in script. For more information, see Providing Data to WMI.

WMI scripts can be written in any scripting language that can interact with ActiveX objects.

Windows PowerShell provides a simple environment for WMI administration and scripting. For more information about PowerShell, see Getting Started with Windows PowerShell.

Active Directory Service Interfaces (ADSI) scripts provides access to Active Directory Domain Services (AD DS) objects. Both WSH and ADSI scripts access objects and allow procedures not available through batch files.

Related topics

About WMI
Scripting API for WMI

 

 

Show:
© 2014 Microsoft. All rights reserved.