Read the CHANGELOG
CIM is the replacement for WMI in Windows Server 2008 and above and aside from being very easy to use, it's also important to use because it's faster, less resource intensive, more reliable, and supports timeouts out of the box. Unfortunately the components built into PowerShell only work to Windows Server 2012 and above.
Cim, the module, changes that by giving you an easy way to create the CIM connection to computers as old as Windows Server 2003. It also manages connections so you don't create the same one over and over (a problem the built-in function has).
But another big part of WMI and CIM that is often overlooked is remote registry operations. Most remote registry commands have to be run over a PSSession and cause a shell to be provisioned and torn down each time. There's no reason for this except laziness, but now the Cim module lets you do this all remotely over the CimSession. It also supports easy chaining to get the data you want.
Install-Module Cim
New-CimSessionDown
anywhere you would previously useNew-CimSession
Get-CimRegKey
Get-CimRegValue
- Every CIM operation should include an -OperationTimeoutSec. It defaults to 30.
Get-CimRegKey
andGet-CimRegValue
can be chained together to an arbitrary length without specifying additional CimSession parameters.