WMI Tasks for script System Control

WMI Tasks for Scripts and Applications

The following sections describe various computer and network administration tasks and provide links to the WMI class or classes used to perform those tasks. For more information, see Creating a WMI Application or Script. For a comprehensive guide on how to write WMI scripts, see the System Administration Scripting Guide for Windows 2000. For more information about using WMI, see Further Information. For more information about using WMI, see TechNet ScriptCenter. (These resources may not be available in some languages and countries.)

For more information about how to provide data to WMI, see Using WMI, which will reference topics about writing a WMI provider.

The operations shown in script examples can be performed by applications in C++ or Visual Basic. For more information, see Creating a WMI Application Using C++ and WMI C++ Application Examples.

The following table lists the categories of tasks.

Task CategoriesDescription
Accounts and DomainsObtain information such as the computer domain or the currently logged-on user. Many domain- or account-related tasks are best performed with ADSI scripts. For examples, see the TechNet ScriptCenter at http://www.microsoft.com/technet.
Computer HardwareObtain information about the presence, state, or properties of hardware components. For example, you can determine whether a computer is a desktop or laptop.
Computer SoftwareObtain information such as which software is installed by the Windows Installer (MSI) and software versions.
Connecting to the WMI ServiceTo get data from WMI, either on the local computer or from a remote computer, you must connect to the WMI service by connecting to a specific namespace. In most cases, use either the shorthand moniker connection or the Locator connection.
Dates and TimesWindows XP introduced several WMI classes and a scripting object to parse or convert the CIM datetime format.
Desktop ManagementObtain data from or control remote desktops. For example, you can determine whether or not the screensaver requires a password. WMI also gives you the ability shut down a remote computer.
Disks and File SystemsObtain information about disk drive hardware state, logical volumes.
Event LogsObtain event data from NT Event log files and perform operations like backing up or clearing log files.
Files and FoldersChange file or folder properties through WMI, including creating a share or renaming a file.
NetworkingManage and obtain information about connections and IP or MAC addresses.
Operating SystemsObtain information about the operating system such as version, whether it is activated, or which hotfixes are installed.
Performance MonitoringUse the WMI classes that obtain data from performance counters to access and refresh data about computer performance.
ProcessesObtain information such as the account under which a process is running. You can perform actions like creating processes.
Printers and PrintingManage and obtain data about printers, such as finding or setting the default printer.
RegistryCreate and modify registry keys and values.
Scheduled TasksCreate and get information about scheduled tasks.
ServicesObtain information about services, including dependent or antecedent services.


댓글 입력 영역

통계 위젯 (블랙)