Hi,
in some circumstances a Windows guest VM does not boot and stops with Error:
- Stoperror: 0xc000186
- Boot critical file C:\windows\system32\ntoskrnl.exe is corrupt.
Continue reading VMware: Windows Guest VM does not boot due to Error 0xc000186 ntoskrnl.exe →
Hi,
this script repairs and recreates the WMI Repository of a Windows. For example, this occurs sometimes if you clone a Windows machine with an installed SCCM/SMS Client. The typical error in this case is “Failed to open to WMI namespace ‘\\.\root\CCM\SoftwareUpdates\DeploymentAgent’ (8007045b)”
Lasts start. Start a Powershell console as Administrator. Stop all services. Sometimes other services depends on the WMI Service and does not accept a stop request. Therefore you cannot stop the WMI service. TrendMicro Office is such a service. You have to kill them by TaskManager.
1 2 3 4 | Stop-Service -Force ccmexec -ErrorAction SilentlyContinue
Stop-Service -Force winmgmt
|
(Re)Register WMI binary components
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | [String[]] $aWMIBinaries =@( "unsecapp.exe" , "wmiadap.exe" , "wmiapsrv.exe" , "wmiprvse.exe" , "scrcons.exe" )
foreach ( $sWMIPath in @(( $ENV:SystemRoot + "\System32\wbem" ),( $ENV:SystemRoot + "\SysWOW64\wbem" ))){
if ( Test-Path -Path $sWMIPath ){
push-Location $sWMIPath
foreach ( $sBin in $aWMIBinaries ){
if ( Test-Path -Path $sBin ){
$oCurrentBin = Get-Item -Path $sBin
Write-Host " Register $sBin"
& $oCurrentBin .FullName /RegServer
}
else {
if ( $sWMIPath -eq $ENV:SystemRoot + "\System32\wbem" ){
Write-Warning "File $sBin not found!"
}
}
}
Pop-Location
}
}
|
Reregister WMI Managed Objects
Continue reading Windows: Powershell script to fix and repair WMI →
My Knowledgebase for things about Linux, Windows, VMware, Electronic and so on…