If you do have issues with WMI, I've found salvagerepository on each affected workstation can fix most of the issues. I wrote the following script in PowerShell (usual disclaimer about understanding scripts before running them on live systems, etc.) which reads a simple line per computer list of workstations stored in the computers.txt file and using psexec.exe executes the generated batch file on each of them.
Set-Location C:
$pathS3 = "D:\SOLUS3"
$arrComputers = Get-Content $pathS3\computers.txt
$wmiBatFile = @"
whoami > "C:\Program Files\Solus3\FixWMI.log" 2>&1
Echo %date% %Time% >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
c:
cd "C:\Program Files\Solus3"
dir >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net stop "IP Helper" /Y >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net stop "Windows Management Instrumentation" /Y >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
winmgmt /salvagerepository >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
winmgmt /resetrepository >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net start "IP Helper" >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net start "Windows Management Instrumentation" >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net start "Security Center" >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
net start "SMS Agent Host" >> "C:\Program Files\Solus3\FixWMI.log" 2>&1
Echo %computername% >> "C:\Program Files\Solus3\FixWMI.log"
"@
foreach ($strComputer in $arrComputers) {
if (Test-Connection -Computername $strComputer -BufferSize 16 -Count 1 -Quiet) {
$output = "\\$strComputer\c$\Program Files\Solus3\FixWMI.bat"
$wmiBatFile | Out-File -Encoding Default $output
$psexec = $pathS3+'\psexec \\'+$strComputer+' -s -h -i cmd /c "c:\Program Files\Solus3\FixWMI.bat"'
Write-Host $psexec
Invoke-Expression $psexec
$user = gwmi win32_computersystem -comp $strComputer | select Username,Caption,Manufacturer
if ($user.Username -eq $null) {
write-host “Online:” $strComputer “no-one is logged in, sending re-boot command"
Restart-Computer -ComputerName $strComputer
} else { write-host “Online:” $strComputer "user" $user.Username “is currently logged in, please manually re-boot machine once it is free” }
} else { Write-Host “Offline:” $strComputer ", no WMI fix could be preformed"}
}