Friday, March 25, 2011

Straighten up and fly right WMI

sc config winmgmt start= disabled 
kill -f XXX <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< pid obtained before 
cd /D %windir%\system32\wbem 
rmdir /s /q repository 
rmdir /s /q Logs 
mkdir Logs 
for /R %i in (*.dll) do (regsvr32 /s %i) 
regsvr32 /s fastprox.dll 
for /R %i in (*.exe) do (%i -regserver) <<<<<<<<<<<<< this will open wbemtest and/or wmic.exe. Just close it 
sc config winmgmt start= auto 
regsvr32 wbemupgd.dll  <<<<<<<<<<<<<< this can take 30 seconds to 2 minutes 
net start server && net start workstation && net start termservice 




snipped fromhttp://groups.google.com/group/microsoft.public.win32.programmer.wmi/msg/1da6ab3690bc75a0>

Tuesday, March 22, 2011

Those empty WSUS Groups got ya down

Can't delete those empty WSUS groups:

DELETE FROM [SUSDB].[dbo].[tbDeployment]
WHERE [TargetGroupID]=''

DELETE FROM [SUSDB].[dbo].[tbFlattenedTargetGroup]
WHERE [TargetGroupID]=''

DELETE FROM [SUSDB].[dbo].[tbTargetGroup]
WHERE [TargetGroupID]=''
Go