Elements of Windows Management Infrastructure (WMI)
Features of WMI APIs What is CIM/WMI? What is MOF
Starting in Windows 8 and Windows Server 2012, there are the CIM: Common Information Model (CIM) is the DMTF standard Managed Object Format (MOF) is the language used to describe following ways of creating WMI applications, including: [DSP0004] for describing the structure and behavior of the Common Information Model (CIM) classes. Tight alignment with standards managed resources such as storage, network, or software Developers can create a MOF manually, and run Convert- o Work across systems using the http-based WS-Man components. For more information, visit http://www.dmtf.org. MofToProvider to generate a code skeleton for a provider. protocol. (DCOM is still supported) o Align with the CIM 2.60 Infrastructure specification, WMI: Windows Management Infrastructure (WMI) is a CIM What is Convert-MofToProvider? including standard Indications (events) and Errors server that implements the CIM standard on Windows. Convert-MofToProvider is a command-line tool that generates a Native-code provider APIs new provider code skeleton and project from an existing MOF o NO MORE COM CODING REQUIRED! Developers can What are WS-Man and WinRM? file. It ships in the Windows Platform SDK. Convert- focus on developing the business logic, rather than the WS-Man: WS-Management (WS-Man) protocol is a SOAP-based, MofToProvider is stand-alone, and does not require Visual complex COM coding. firewall-friendly protocol for management clients to Studio. o Providers contain the MOF & MFL, reducing the communicate with CIM servers. number of items developers must install. o Align with the CIM 2.60 Infrastructure specification, WinRM: Windows Remote Management (WinRM) is the What is Register-CimProvider? including standard Indications (events) and Errors Microsoft implementation of the WS-Man protocol on Windows. Convert-MofToProvider is a command-line tool that works with Provide API support for rich Windows PowerShell WMI providers. The providers contain the MOF and MFL files semantics, such as PromptUser and WhatIf that were shipped separately before the release of Windows 8 o Enables WMI Provider developers to improve IT Pro What is a WMI Provider? and Windows Server 2012. Convert-MofToProvider registers the experience when using Windows PowerShell with WMI makes data about Windows manageable objects available provider without requiring a MOF. It generates the MOF for WMI through WMI providers. The provider is a DLL or EXE that is restore purposes. o Provides scripts and client applications improved user installed on a Windows system, and registered with WMI. The experiences provider code exposes a group of supported classes, instances, Create Windows PowerShell cmdlets from WMI providers and events to pass data to WMI. In turn, a management What are rich Windows PowerShell semantics? by using XML application or script can call provider methods to manipulate WMI APIs provide support for several features of the Windows o Developers and advanced IT Pros can use CDXML to provider-supplied data. PowerShell APIs: wrap existing CIM classes, creating new PS cmdlets without .NET Framework coding. A provider retrieves data from hardware, software or system WhatIf /Confirm o Developers can create cmdlets in native code by components such as a process, or an instrumented application o Allows the user to verify what the results of a cmdlet implementing a WMI provider, and writing CDXML to such as SNMP or IIS, and passes that data via WMI to a are without actually running the cmdlet go with it. management application. o For more information, see the whitepaper, “Using WriteWarning/WriteError/WriteMessage/WriteVerbose cmdlet definition XML to create Windows PowerShell What about compatibility? o Allows feedback to be displayed so that IT Pro users cmdlets” at control the amount of information about command WMI maintains full compatibility with the the older Windows http://go.microsoft.com/fwlink/?LinkId=252460. progress that they are shown in the console. Management Instrumentation implementation. Other developer tools available in Windows Server 2012, Streaming WMI providers work with WMI client applications that were Windows 8, and forward: o Improves UI responsiveness for client applications by introduced in Windows 8 and Windows Server 2012. Existing sending data back from a method invocation as a client applications work with new and existing WMI providers. Convert-MofToProvider: stream, rather than waiting for all instances to be Indications and CIM errors are automatically mapped to the o This is an SDK tool that generates a provider skeleton gathered. older Events & WMI error structures. from a class defined in MOF Register-CimProvider: The most current version of WMI ships as a downloadable o This is an in-box tool for registering new WMI update to Windows 7 SP1 and Windows Server 2008 R2 SP1, as providers. part of Windows Management Framework 4.0 o Tool also generates the MOF & MFL used in restore (http://www.microsoft.com/download/details.aspx?id=40855). situations.
Copyright Microsoft Corporation, 2012
Elements of Windows Management Infrastructure (WMI) What is a CIM indication? What are various CIM operations? Creating CIM-based cmdlets A CIM indication is a representation of an event in the managed CIM classes implement methods explicitly defined in their Developers and advanced IT Pros can use CDXML to wrap system. specifications (called extrinsic) and a set of standard, predefined existing CIM classes to provide a more PS friendly task methods. The predefined methods are called intrinsic methods, abstraction. For more information, see the whitepaper, “Using A CIM client can subscribe for receiving indications by providing and include: cmdlet definition XML to create Windows PowerShell cmdlets” the indication type and the filtering expression, which selects o Enumerate instances of a class at http://go.microsoft.com/fwlink/?LinkId=252460. o Enumerate associated instances events that will be delivered to the client. o Get instances by executing a query on server. o Get a specific instance of a class More information o Create a new instance of class WMI Blog: http://blogs.msdn.com/b/wmi/ o Modify an instance of a class Windows PowerShell Blog: What is an association o Delete instance of a class http://blogs.msdn.com/b/powershell/ An association represents a relationship between two or more o Invoke extrinsic method on a class or instance Script Center: instances of managed resources like disk and volumes or o Enumerate Classes in a namespace http://technet.microsoft.com/scriptcenter/bb410849 directories and files. Given an instance of a class, a CIM server o Get class schema Scripting Guys: http://blogs.technet.com/b/heyscriptingguy/ returns all instances related to the given instance. You can also o Subscribe for indications WS-Man Cmdlet Help: filter the results by specifying a target class or the name of the o Unsubscribe from indications. CIM cmdlets are http://technet.microsoft.com/library/hh849876.aspx association relationship. modeled on CIM operations. Get-WmiObject Help: http://technet.microsoft.com/library/hh849824.aspx Invoke-WmiMethod Help: http://technet.microsoft.com/library/hh849748.aspx Register-WmiEvent Help: http://technet.microsoft.com/library/hh849840.aspx Remove-WmiObject Help: http://technet.microsoft.com/library/hh849820.aspx Set-WmiInstance Help: http://technet.microsoft.com/library/hh849833.aspx