1. 把相关修复文件复制到有问题的电脑的本地硬盘,比如C:\Temp

2. 运行 Uninstall.cmd

@rem Stop all SCCM Processes
net stop ccmexec
taskkill /F /FI "SERVICES eq ccmexec"
taskkill /F /IM ccmexec.exe
taskkill /F /IM ccmeval.exe
taskkill /F /IM ccmsetup.exe
taskkill /F /IM ccmrepair.exe
taskkill /F /IM CmRcService.exe
taskkill /F /IM SCNotification.exe
taskkill /F /IM msiexec.exe
taskkill /F /IM ccmrestart.exe
taskkill /F /IM Ccm32BitLauncher@rem Set WMI to run in standalonehost
C:\Windows\System32\wbem\WinMgmt.exe /standalonehost@rem Set the Windows Modules Installer service to manual start
sc config TrustedInstaller start= demand@rem Make sure C:\Windows\Installer exists
md C:\Windows\Installer%~dp0ccmsetup.exe /uninstall@rem Delete .SDF and .SQLCE files
del /q C:\Windows\CCM\*.sdf
del /q C:\Windows\CCM\*.sqlce@rem Uninstall Silverlight
@rem %SystemRoot%\System32\wbem\WMIC.exe product where caption='Microsoft Silverlight' call uninstall@rem Kill any BITS transfers that might be in error.
%~dp0tools\PsExec.exe -s -accepteula bitsadmin.exe /reset /ALLUSERS@rem delete SMS certificates
%~dp0tools\ccmdelcert.exe
PowerShell.exe -NoProfile -Command "Get-ChildItem Cert:\LocalMachine\SMS | Where-Object {$_.FriendlyName -like 'SMS*' } | Remove-Item"
%~dp0tools\setacl.exe -on "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\19*" -ot file -rec cont_obj -actn ace -ace "n:administrators;m:grant;p:full"
PowerShell.exe -NoProfile -Command "Get-ChildItem -Path 'C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\' | Where-Object {$_.Name -like '19*' } | Remove-Item -Force"If exist c:\Windows\SMSCFG.INI del /q c:\Windows\SMSCFG.INI@Rem Delete Client Registry Keys
REG DELETE HKLM\SOFTWARE\Microsoft\CCMSetup /f
REG DELETE HKLM\SOFTWARE\Microsoft\SMS /f
REG DELETE HKLM\SOFTWARE\Wow6432Node\Microsoft\CCM /f
REG DELETE HKLM\SOFTWARE\Wow6432Node\Microsoft\CCMSetup /f
REG DELETE HKLM\SOFTWARE\Wow6432Node\Microsoft\SMS /fC:\Windows\System32\takeown.exe /f C:\Windows\CCM\* /R /A
C:\Windows\System32\takeown.exe /f C:\Windows\ccmsetup\* /R /A
%~dp0tools\setacl.exe -on "C:\Windows\CCM\*" -ot file -rec cont_obj -actn ace -ace "n:administrators;m:grant;p:full"
%~dp0tools\setacl.exe -on "C:\Windows\ccmsetup\*" -ot file -rec cont_obj -actn ace -ace "n:administrators;m:grant;p:full"pause

3. 运行 C:\Temp\Client\tools\ccmclean.exe

4. 删除所有CCM开头的文件夹。

:操作过程中,发现CCM目录下会有一个 SensorFramework子目录无法被删除,做删除的时候也没报错,但就是删除不掉。另外,目录里会有几个c4eaa67d开头的文件。

删除办法:运行 logman -ets 命令,列出当前活动的会话,然后运行 logman stop <会话名> -ets 来停止那几个 c4eaa67d开头的会话,停止后SensorFramework目录里的文件会自动删除,然后就可以删除 CCM目录了。

5. In case, if a folder is stuck and can’t be removed run the following:

sc queryex winmgmt

taskkill /f /pid  <<上一个命令得到的 PID >>

6.  检查确认 C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\ 目录里,开头是19*的 "RSA-MachineKey" 已经被删除掉。如果还存在,就手动删除掉。

7.  建议运行一下 winmgmt /resetrepository 来修复WMI repository. WMI 出问题通常会影响到SCCM的正常运行。

8. 运行 C:\Temp\Client\Install.cmd

@rem Stop all SCCM Processes
net stop ccmexec
taskkill /F /FI "SERVICES eq ccmexec"
taskkill /F /IM ccmexec.exe
taskkill /F /IM ccmeval.exe
taskkill /F /IM ccmsetup.exe
taskkill /F /IM ccmrepair.exe
taskkill /F /IM CmRcService.exe
taskkill /F /IM SCNotification.exe
taskkill /F /IM msiexec.exe
taskkill /F /IM ccmrestart.exe
taskkill /F /IM Ccm32BitLauncher@rem Set WMI to run in standalonehost
C:\Windows\System32\wbem\WinMgmt.exe /standalonehost@rem Set the Windows Update service to run with shared memory
sc config wuauserv type= share@rem Set the Windows Modules Installer service to manual start
sc config TrustedInstaller start= demand@rem Set the Windows Firewall service to auto start
sc config MpsSvc start= auto
sc start MpsSvc@rem Make sure C:\Windows\Installer exists
md C:\Windows\Installer@rem Solution to "The system administrator has set policies to prevent this installation"
Reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer" /v DisableMSI /d 0 /t REG_DWORD /f@rem Set DNS negative caching back to MS default
reg.exe delete HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters /v MaxNegativeCacheTtl /f@rem Delete the contents of C:\Windows\SoftwareDistribution
Net stop wuauserv
powershell.exe -NoProfile -command "Get-ChildItem -Path 'C:\Windows\SoftwareDistribution\' -Recurse | Foreach-object {Remove-item -Recurse -path $_.FullName -Force }"
powershell.exe -NoProfile -command "Get-ChildItem -Path 'C:\Windows\System32\GroupPolicy\' -Recurse | Foreach-object {Remove-item -Recurse -path $_.FullName -Force }"
Net start wuauserv@rem Uninstall the SCCM client if installed
%~dp0ccmsetup.exe /uninstall@rem Delete .SDF and .SQLCE files
del /q C:\Windows\CCM\*.sdf
del /q C:\Windows\CCM\*.sqlce@rem Uninstall Silverlight
@rem %SystemRoot%\System32\wbem\WMIC.exe product where caption='Microsoft Silverlight' call uninstall@rem Kill any BITS transfers that might be in error.
%~dp0tools\PsExec.exe -s -accepteula bitsadmin.exe /reset /ALLUSERS@rem delete certificate file
%~dp0tools\ccmdelcert.exe
PowerShell.exe -NoProfile -Command "Get-ChildItem Cert:\LocalMachine\SMS | Where-Object {$_.FriendlyName -like 'SMS*' } | Remove-Item"
%~dp0tools\setacl.exe -on "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -ot file -rec cont_obj -actn ace -ace "n:system;m:grant;p:full"
%~dp0tools\setacl.exe -on "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\19*" -ot file -rec cont_obj -actn ace -ace "n:administrators;m:grant;p:full"
PowerShell.exe -NoProfile -Command "Get-ChildItem -Path 'C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\' | Where-Object {$_.Name -like '19*' } | Remove-Item -Force"If exist c:\Windows\SMSCFG.INI del /q c:\Windows\SMSCFG.INI@rem Install Visual C++ 2013 Runtime
%~dp0x64\vcredist_x64.exe /install /quiet /norestart
%~dp0i386\vcredist_x86.exe /install /quiet /norestart%~dp0ccmsetup.exe /source:%~dp0 /noservice /skipprereq:silverlight.exe SMSSITECODE=《站点代号》 FSP=《FSP地址》 DNSSUFFIX=《DNS后缀》 SMSMP=《MP的地址》 RESETKEYINFORMATION=TRUE@Rem Set SCCM Client work hours
%SystemRoot%\system32\cscript.exe %~dp0Tools\Client_Work_Hours_Set_to_No_Days.vbs

8. 在控制面板里运行 “Configuration Manager”

9. 运行 Actions 标签里的所以 Action:

【备忘】修复SCCM客户端相关推荐

  1. E6终极备忘:修复IE6下_25+_Bugs

    E6终极备忘:修复IE6下_25+_Bugs 引言:"珍惜生命,远离IE 6!"       对IE6最好的策略就是不去兼容它. 好吧,我知道你的难处,你不得不去兼容IE6这个狗血 ...

  2. git-flow 流程 备忘清单

    关于 git-flow 是一个 git 扩展集,按 Vincent Driessen 的分支模型提供高层次的库操作. 查看详情 ★ ★ ★ 这个备忘清单展示了 git-flow 的基本操作和效果. ★ ...

  3. jQuery学习笔记--JqGrid相关操作 方法列表 备忘 重点讲解(超重要)

    JqGrid相关操作备忘 方法列表 特别推荐:怎样获取某一方某一列的值: [html] view plaincopy var rowdata=jQuery("#list").jqG ...

  4. [备忘] Automatically reset Windows Update components

    这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...

  5. iframe实现页面无刷新上传文件(PHP)----备忘

    之前做一个文件上传的,由于那段时间写ajax比较多,所以就想利用Ajax来实现,后来发现,Ajax没法实现文件上传, 后来百度之,这里做个备忘. 提示:利用form表单的target属性和iframe ...

  6. element ui字段_ui备忘单下拉字段

    element ui字段 重点 (Top highlight) Dropdowns get a lot of flak from the UI world – and if we are honest ...

  7. git commit message——git提交日志规范备忘

    使用git提交时,最好能注意保持规范,可能某些公司对这方面没有要求,但是提交日志不规范的话,不方便查阅和管理. 在此记录下commit的类别,备忘,更详细的介绍,可以查看文末链接. commit me ...

  8. PowerBuilder/PB常用备忘

    目录 1. PB使用Microsoft.XMLHttp组件的属性与方法 1-1 使用步骤 1-2 XMLHTTP方法: 1-3 XMLHTTP属性: 1-4 示例: 2. Pb中Window添加鼠标滚 ...

  9. Web 应用程序——我的心理备忘单

    介绍 本文是"持续交付:HTML 到 Kubernetes"的一部分. 虽然我迫不及待地想深入了解分布式系统的细节,但我发现自己处于一个不愉快的境地:我认为最好从前端开始写. 那是 ...

  10. jQuery学习笔记--JqGrid相关操作 方法列表 备忘 重点讲解(超重要) from:jpr1990

    JqGrid相关操作备忘 方法列表 1.获得当前列表行数:$("#gridid").getGridParam("reccount"); 2.获取选中行数据(js ...

最新文章

  1. 求字符串中最长无重复子序列
  2. [网站链接]Debbie博客上的链接: [求职网站][博客链接][信息资源]……
  3. Android --- log.e(),log.d(),log.i()等的区别
  4. python元编程_Python 元编程
  5. [转]Linux环境下段错误的产生原因及调试方法小结
  6. BZOJ-2440 (莫比乌斯函数)
  7. c语言equal,C ++中的ratio_equal()示例
  8. ios view添加上边框_iOS开发之如何给View添加指定位置的边框线详解
  9. zabbix的b编译安装
  10. css overflow: scroll 去滚动条后,低端手机有兼容问题,可以这样
  11. 字符串指针与一维指针数组的区别
  12. 商业流程中的traversedpath
  13. 正交矩阵、正规矩阵和酉矩阵
  14. 搅拌反应釜cad图纸_搅拌式反应釜设计(三维SW)【全套含有CAD图纸三维建模】...
  15. 华为手机pc模式机型_华为 P20 搭载的 PC 模式厉害了,刷新你对手机的认知
  16. linux连接一加手机,How To Build CyanogenMod Android (oneplus/bacon) On Linux
  17. APM(应用性能管理)与Dapper原理介绍
  18. 微信公众号申请到开发环境搭建
  19. 阿拉伯字母发音--全集
  20. 国内外网站空间优劣势

热门文章

  1. 泰山OFFICE技术讲座:微软雅黑字体故意设置的坑,粗体错误
  2. Detecting Novel Associations in Large Data Sets(检测 大型数据集中的信息关联性,数据相关性)
  3. 【内部流出,勿做商用】今日教大家如何抢聚划算
  4. Android 如何屏蔽返回键和Home键
  5. 【探索HTML5第二弹03】走近地图应用的世界,看我们google地图可以看些什么!
  6. 爆破字典生成器kali之crunch
  7. Word中公式编辑的快捷键
  8. Flashpaper序列号
  9. 现代计算机存储数据的基本单位是,计算机中存储数据的最小单位和存储容量的基本单位各是什么?...
  10. (Android+Qt最小系统设计方案)RK3288核心板设计之软件开发环境搭建(4.0)