Recently had an issue where an entire site was not downloading domain policies. After a thorough search and different attempts to fix the issue I came across a batch file that I want to list here for future reference:
make the following into a batch file
net stop winmgmt
pause
c:
cd c:\windows\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
mofcomp exwmi.mof
mofcomp -n:root\cimv2\applications\exchange wbemcons.mof
mofcomp -n:root\cimv2\applications\exchange smtpcons.mof
mofcomp exmgmt.mof
After running this re-run the GPUPDATE /force
Just want to let you know you're fucking brilliant. Only fix I found on the internet that fixed this issue. Would love to know exactly what this script is doing.
ReplyDeleteI had the invalid namespace error as well and it wouldn't apply domain Group Policies. Created the batch file as you instructed and bam, everything worked!!
ReplyDeleteYup, this did the trick for me too on a 2008 R2 RD server. Make sure to run the bat from the command line, it is interactive.
ReplyDeleteperfec work.
ReplyDeleteThanks for Your script.
ReplyDeleteAwesome
ReplyDelete