Thursday, October 17, 2013

Script to reinstall SCCM 2012 client

--------------------------------

'uninstall client
-----------------
c:\windows\ccmsetup\ccmsetup.exe \uninstall


'check ccmsetup logs
--------------------
'c:\windows\ccmsetup\logs\ccmsetup.log = CcmSetup is exiting with return code 0


'delete smscfg
--------------
del C:\Windows\SMSCFG.ini


'copy client
------------
roboCOPY "\\XXXXXsccm1\e$\Program Files\Microsoft Configuration Manager\Client" c:\client
roboCOPY "\\XXXXXsccm1\e$\Program Files\Microsoft Configuration Manager\Client\i386" c:\client\i386
roboCOPY "\\XXXXXsccm1\e$\Program Files\Microsoft Configuration Manager\Client\x64" c:\client\x64


'stop services
--------------
net stop Windows Management Instrumentation


'rename repository to repository.old
------------------------------------
ren c:\windows\System32\Wbem\Repository Repository.old


'restart services
-----------------
net start Windows Management Instrumentation


'install client
---------------
c:\client\ccmsetup.exe /MP:XXXXXsccm2.gsn.local SMSMP=XXXXXsccm2.gsn.local


'check ccmsetup logs
--------------------
'c:\windows\ccmsetup\logs\ccmsetup.log = CcmSetup is exiting with return code 0


'successfull msg box
--------------------
'msgbox "SCCM Client installation Successful"

1 comment: