Chapter 5: Using WMI


image from book Download CD Content

Overview

After completing this chapter, you will be able to:

  • Understand the concept of WMI namespaces

  • Use the WMI namespaces

  • Navigate the WMI namespaces

  • Understand the use of WMI providers

  • Discover classes supplied by WMI providers

  • Use the Get-WmiObject cmdlet to perform simple WMI queries

  • Produce a listing of all WMI classes

  • Perform searches to find WMI classes

The inclusion of Windows Management Instrumentation (WMI) in virtually every operating system released by Microsoft since Windows NT 4.0 should give you an idea of the importance of this underlying technology. From a network management perspective, many useful tasks can be accomplished using just Windows PowerShell, but to truly begin to unleash the power of scripting, you need to bring in additional tools. This is where WMI comes into play. WMI was designed to provide access to many powerful ways of managing Microsoft Windows systems. In this section, we dive into the pieces that make up WMI. We look at several concepts-namespaces, providers, and classes-and show how these concepts can aid us in leveraging WMI in our Windows PowerShell scripts. All the scripts mentioned in this chapter can be found in the corresponding scripts folder on the CD.

In Windows Vista, more than 100 new WMI classes were introduced. In products such as Microsoft Exchange Server, Microsoft SQL Server, and Microsoft Internet Information Server (to mention a few), support for WMI continues to grow and expand. Some of the tasks you can perform with WMI follow:

  • Report on drive configuration

  • Report on available memory, both physical and virtual

  • Back up the event log

  • Modify the registry

  • Schedule tasks

  • Share folders

  • Switch from a static to a dynamic IP address




Microsoft Press - Microsoft Windows PowerShell Step by Step
MicrosoftВ® Windows PowerShell(TM) Step By Step (Step By Step (Microsoft))
ISBN: 0735623953
EAN: 2147483647
Year: 2007
Pages: 128
Authors: Ed Wilson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net