Server2025系统用NTLite精简系统后出现服务器管理器ServerManager报错处理方法

迅恒数据中心
ServerManager报错,自动退出,删除注册表:
HKLM\SOFTWARE\Microsoft\ServerManager\ServicingStorage\ServerComponentCache
重启服务器后生效
==============================
如果以上不行就执行下面的
# 强制结束进程,保存为PS1执行
Stop-Process -Name ServerManager -Force -ErrorAction SilentlyContinue
# 删除缓存目录所有缓存文件
$cachePath = "$env:LocalAppData\Microsoft\ServerManager"
if(Test-Path $cachePath){
    Remove-Item "$cachePath\Cache\*" -Recurse -Force -ErrorAction SilentlyContinue
    Remove-Item "$cachePath\*cache.xml" -Force -ErrorAction SilentlyContinue
}

Get-WindowsFeature
看是否能列出功能列表

重置 WMI/CIM 仓库:
net stop winmgmt
ren C:\Windows\System32\wbem\repository repository_bak
net start winmgmt

Get-WindowsFeature | Select-Object -First 20
看是否报错

winmgmt /salvagerepository

net stop winmgmt /y
sc config winmgmt start= disabled
cd C:\Windows\System32\wbem
:: 备份旧仓库
ren repository repository.bak
:: 重新注册wbem下所有dll
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
:: 重新编译MOF
mofcomp *.mof
sc config winmgmt start= auto
net start winmgmt

分类:教程帮助 百度收录 必应收录