is the infrastructure for data management and operations on all Windows-based operating systems. Its purpose is to help administrators manage different Windows operational environments, including remote systems. Windows Management Instrumentation (WMI)
An Alias is an abstraction introduced as part of the Windows command line tool. It provides simplified keywords to execute complex queries from the command line. Aliases capture the features of a WMI class that are relevant to some specific tasks such as disk or network administration. Visit this link to know more about WMI aliases.
Troubleshooting WMI Repository
When accessing WMI local or remote data in an application or script, the user may encounter errors ranging from missing classes to access denial. These errors may also affect the HEC-RAS analysis computation with a “CPU – Alias not found” error, as shown below. For such errors, WMI troubleshooting can be performed to troubleshoot possible errors.
Note that if WMI returns error messages, be aware that this may not only indicate problems in the WMI service or WMI providers. Failures can also originate in other parts of the operating system and emerge as errors through WMI.
To check whether the WMI service is running correctly or not, run WMI Diagnosis Utility.
If you encounter any issue with the WMI service, perform the steps given below to run the WMI diagnosis:
- Open the Start menu, type cmd in the search bar, and run the Command Prompt application in administrator mode.
- In the Command Prompt window, run the following command:
- If the WMI repository is inconsistent, run the following command that will repair the WMI repository:
- Run the following command again to verify that the WMI repository has been repaired successfully:
If the WMI repository does not self-correct even after performing Step 3 and Step 4, the user has to rebuild the entire WMI repository from scratch.
Follow the steps given below to rebuild the entire WMI repository:
- Run the Command Prompt application in administrator mode.
- In the Command Prompt window, run the following command to disable/stop the WMI service:
net stop winmgmt
- Then, from the Windows C drive, navigate to the following path and remove or rename the Repository folder:
- From the Command Prompt window, navigate to the wbem folder using the following command:
- Then, run the following command:
for /f %s in (‘dir /b *.mof’) do mofcomp %s
- Finally, run the following command:
for /f %s in (‘dir /b en-us\*.mfl’) do mofcomp en-us\%s
- After the successful completion of the process, Done! will be displayed.
- Now, restart the PC and the changes will take effect.