Created
February 22, 2012 10:35
-
-
Save breezhang/1884082 to your computer and use it in GitHub Desktop.
if y get error Get-ExecutionPolicy : Invalid class try this script :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http://msmvps.com/blogs/lduncan/pages/20217.aspx | |
How Do I Rebuilt a Corrupt WMI Repository? | |
The following can be done through a batch file or executed manually from the command line: | |
net stop winmgmt | |
c: | |
cd %systemroot%\system32\wbem | |
rd /S /Q repository | |
regsvr32 /s %systemroot%\system32\scecli.dll | |
regsvr32 /s %systemroot%\system32\userenv.dll | |
mofcomp cimwin32.mof | |
mofcomp cimwin32.mfl | |
mofcomp rsop.mof | |
mofcomp rsop.mfl | |
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s | |
for /f %%s in ('dir /b *.mof') do mofcomp %%s | |
for /f %%s in ('dir /b *.mfl') do mofcomp %%s | |
echo DONE reboot | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment