FIX- Rebuild the WMI On Windows Servers

Needs to follow the below Steps to resolve the WMI Issues.

1. Change startup type to Window Management Instrumentation (WMI) Service to disabled
2.  Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
3.  Rename the repository folder: C:\WINDOWS\system32\wbem\Repository to Repository.old
4.  Open a CMD Prompt with elevated privileges
5.  CD windows\system32\wbem
6.  for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
7.  Set the WMI Service type back to Automatic and start WMI Service
8.  cd /d c:\ ((go to the root of the c drive, this is important))
9.  for /f %s in (‘dir /s /b *.mof *.mfl’) do mofcomp %s
10.  Reboot the server

Recover the WMI

Follow the Below Steps to

1. Stop WMI and kill any WmiPrvse.exe processes.
2. Start up WMI
3. cd C:\Windows\System32\wbem\AutoRecover
4. Run this command: for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s

 

Batch File  for same activity.

Copy the below lines and create the batch file and run on problem server.

@echo off
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%system32wbem
for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
wmiprvse /regserver
winmgmt /regserver
sc config winmgmt start= auto
net start winmgmt
cd \
for /f %s in (‘dir /s /b *.mof *.mfl’) do mofcomp %s

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s