While using Windows Admin Center(WAC), I encountered CimCmdLets Connection error. This article aims to provide a solution for WAC CimCmdLets Connection error.

Windows Admin Center is a locally deployed, browser-based app for managing Windows servers, clusters, hyper-converged infrastructure. Windows Admin Center is a free product that is ready to use in production. You can download the latest version of Windows Admin Center from the Microsoft Evaluation Center.

Usually with Windows Admin Center, you connect to Windows Servers and manage them. However, all of a sudden, I noticed an error popping up while connecting to one of my servers. The CimCmdLets Connection error appeared while connecting to more than one server in Windows Admin Center console.

Install and Update Third Party Applications with Patch My PC
Install and Update Third Party Applications with Patch My PC

Fix Windows Admin Center CimCmdLets Connection Error

When trying to connecting to server from Windows Admin Center, the following error was seen.

Connection Error – Remote Exception: The specified module ‘CimCmdlets’ was not loaded because no valid module file was found in any module directory.

The CimCmdLets Connection error appears when it cannot find the required module file in the module directory. It could be the fact that the file is on your system, but the path where it tries to look for it is not defined properly.

Adding the module path to the environmental variable using a PowerShell script will fix the CimCmdlets error.

Windows Admin Center CimCmdLets Connection Error
Windows Admin Center CimCmdLets Connection Error

Open up an elevated PowerShell and look for the contents of the environment variable by just typing this command:

$Env:PsModulePath

To fix the Windows Admin Center CimCmdlets connection error, perform the following steps:

First, launch the Windows PowerShell ISE as administrator. Now copy the below PowerShell script and run it in Windows PowerShell ISE.

You may also save this script as file.ps1 and run it from a PowerShell window. This script is available on Microsoft Site for download. The following PowerShell script adds the C:\Windows\System32\WindowsPowerShell\v1.0\Modules path to the value of the PSModulePath environment variable without expanding the un-expanded strings.

$key = (Get-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager').OpenSubKey('Environment', $true)
$path = $key.GetValue('PSModulePath','','DoNotExpandEnvironmentNames')
$path += ';C:\Windows\System32\WindowsPowerShell\v1.0\Modules'
$key.SetValue('PSModulePath',$path,[Microsoft.Win32.RegistryValueKind]::ExpandString)
Fix Windows Admin Center CimCmdLets Connection Error
Fix WAC CimCmdLets Connection Error

Once the script is executed successfully, close the PowerShell ISE. Now launch the Windows Admin Center and the WAC CimCmdLets Connection error should be fixed now.

Still Need Help?

If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.

Prajwal Desai

Prajwal Desai is a technology expert and 10 time Dual Microsoft MVP (Most Valuable Professional) with a focus on Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. He is a renowned author, speaker, & community leader, known for sharing his expertise & knowledge through his blog, YouTube, conferences, webinars etc.