Sponsors

Thursday, 24 March 2016

Understanding WMI and CIM in Powershell



Windows Management Instrumentation (WMI) and Common Information Model (CIM). both are  technologies based on industry standards defined by the Distributed Management Task Force (DMTF).

WMI is Microsoft’s implementation of the Web-Based Enterprise Management (WBEM) standard and is based on preliminary standards and proprietary technology. WMI has been available on the Windows
operating system since Windows NT 4.0.

CIM is a newer technology, and is based on open, cross-platform standards.

Both technologies provide a way to connect to a common information repository (aka WMI
repository). This repository holds management information that you can query and manipulate.

Windows PowerShell™ 3.0 and later supports both technologies.

CIM Commands:

CIM commands provide many different cross-platform and cross-version capabilities.

There are 3 types of connections possible with CIM.
  1. Connection to local Computer using DCOM.
  2. Ad hoc connection to remote computer using WS-MAN
  3. Session based connection to remote computer using DCOM or WS-MAN
You can use CIM commands in two ways.
  1. The first way requires the remote computer to have WinRM installed and enabled.
  2. The second way to use CIM commands is to use the earlier WMI technology for CIM commands.

WMI Commands:

Difference between WMI and CIM is that the way WMI connects to remote system.

WMI commands do not support session-based connections. The commands support only ad hoc
connections over DCOM.

WMI commands communicate with the WMI service. WMI commands are typically necessary only when you have to make an ad hoc connection to a computer that does not have Windows PowerShell remoting enabled.

Use CIM commands primarily, and use WMI commands only when CIM commands cannot be used.

No comments:

Post a Comment

Popular Posts This Week