I had a strange problem when I was installing Sitecore 9.1 and here is the solution.
The problem occurred when running the SIF command Install-SitecoreConfiguration @xconnectParams from the SIF section # Deploy XConnect instance. It failed with this error:
Install-SitecoreConfiguration : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). At line:1 char:1 + Install-SitecoreConfiguration @xconnectParams -verbose *>&1 | Tee-Ob ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration