ISCS_HW
asked on
Repair WMI Remotely
I am trying to repair WMI on client machines remotely. I have this set so that I will run PSEXEC (from the PS Tools suite from SysInternals) on the remote machine, with my domain admin account. It runs a batch file named CALL.BAT (attached), which calls the batch file FIXWMI.BAT (attached). I do this because if I ran the FIXWMI.BAT from the PSEXEC utility, it failed with access denied. When I run PSEXEC on the CALL.BAT file, it runs through a bit better, but seems to want a response from me when running the call c:\fixwmi.bat command in the CALL.BAT file.
Are there any ideas on how I may be able to fix the batch files, or how to repair WMI on a remote computer?
Are there any ideas on how I may be able to fix the batch files, or how to repair WMI on a remote computer?
CALL.BAT
call c:\fixwmi.bat
FIXWMI.BAT
cmd /c echo y | net stop winmgmt
ren C:\WINDOWS\system32\wbem\Repository Repository.old
cmd /c net start winmgmt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try also running the script as a STARTUP script and not a login script. If it runs as a STARTUP script, I believe it runs under the local SYSTEM account, which would have the rights that you need for the script to run.
ASKER
ggefter:
II tried the rundll32 to portion to update WMI, I will get back to you on if it works after the computer is restarted. I don't want to have to locally login to each system to fix the issue, as the broken systems are in multiple countries.
kcoect:
I don't want to set this as a startup, as I don't want it to be "repaired" every time someone logs in to the machine.
II tried the rundll32 to portion to update WMI, I will get back to you on if it works after the computer is restarted. I don't want to have to locally login to each system to fix the issue, as the broken systems are in multiple countries.
kcoect:
I don't want to set this as a startup, as I don't want it to be "repaired" every time someone logs in to the machine.
PsExec....
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
psexec \\remotepc -c fixwmi.bat
Just make sure that psexec is in the same directory as the .bat file.....
-c copies it to the \\remotepc and executes it on the target
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
psexec \\remotepc -c fixwmi.bat
Just make sure that psexec is in the same directory as the .bat file.....
-c copies it to the \\remotepc and executes it on the target
ASKER
The batch files are on the remote PC.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
see screen shot of what is happening
WMI.jpg
WMI.jpg
"The batch files are on the remote PC."
psexec \\remotepc "C:\Path\To\fixwmi.bat"
Or just launch a remote command shell......
psexec \\remotepc cmd.exe
Then just navigate it locally......
psexec \\remotepc "C:\Path\To\fixwmi.bat"
Or just launch a remote command shell......
psexec \\remotepc cmd.exe
Then just navigate it locally......
Why not just use.....
psexec \\remotepc rundll32 wbemupgd, UpgradeRepository
psexec \\remotepc rundll32 wbemupgd, UpgradeRepository
Dont wanna logon to each pc?
psexec @C:\PCNames.TXT -d rundll32 wbemupgd, UpgradeRepository
C:\PCNames.txt is self explanatory, just populate the ones you wanna hit......
psexec @C:\PCNames.TXT -d rundll32 wbemupgd, UpgradeRepository
C:\PCNames.txt is self explanatory, just populate the ones you wanna hit......
ASKER
I am trying that now as mentioned by ggefter
I am also trying re-registering the components you suggested from http://windowsxp.mvps.org/repairwmi.htm
I will let you know how each works.
I am also trying re-registering the components you suggested from http://windowsxp.mvps.org/repairwmi.htm
I will let you know how each works.
Why have cmd /c?
FIXWMI.BAT
echo y | net stop winmgmt
ren C:\WINDOWS\system32\wbem\R epository Repository.old
net start winmgmt
FIXWMI.BAT
echo y | net stop winmgmt
ren C:\WINDOWS\system32\wbem\R
net start winmgmt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The fix by ggefter worked for some of my workstations, and the others were fixed thanks to johnb6767. The script by AmazingTech was also helpful so I did not need to create my own script for this.