Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING can't install sccm client in some machine

  • Thread starter Thread starter albaraa
  • Start date Start date
  • Replies Replies 1
  • Views Views 4K

albaraa

New Member
Messages
3
Reaction score
0
Points
1
i have many PC that i couldn't install sccm client on it even if i try to install it manually

you can see the ccmsetup.log for the target PC

thanks for your effort
 

Attachments

Thanks for the log file. I see two important errors in the file.
  • Failed to connect to machine policy namespace. 0x8004100e ccmsetup
  • Failed to download client files by BITS. Error 0x800704dd ccmsetup

This could be an issue related to WMI corruption. You can run the below script and install the client agent. Let me know if that works.
Code:
@echo off
SET MYDIR=%~dp0

IF NOT EXIST "%windir%\ccmsetup\logs" MKDIR "%windir%\ccmsetup\logs"
IF NOT EXIST %windir%\ccmsetup\logs\ccmsetup.log ECHO "==========[ ccmsetup script started ]==========" > %windir%\ccmsetup\logs\ccmsetup.log
@ping -n 2 %computername%>nul
start %MYDIR%cmtrace.exe %windir%\ccmsetup\logs\ccmsetup.log
DEL /F /S /Q %windir%\ccmsetup\logs\ccmsetup.log
GOTO CCMUninstall

:CCMUninstall
@ECHO Uninstalling client...

"%MYDIR%Client\ccmsetup.exe" /uninstall
@ECHO Post uninstall cleanup...
IF EXIST %windir%\CCM RMDIR /S /Q %windir%\CCM
IF EXIST %windir%\ccmcache RMDIR /S /Q %windir%\ccmcache
IF EXIST %windir%\ccmsetup RMDIR /S /Q %windir%\ccmsetup
GOTO REPAIR_WMI

:REPAIR_WMI
@ECHO Repairing WMI...
sc config winmgmt start= disabled
net stop winmgmt /y
%SYSTEMDRIVE% >nul
cd %windir%\system32\wbem
For /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
wmiprvse /regserver
REM winmgmt /regserver
net start winmgmt
for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s
@ECHO Waiting for WMI repair to finish...
@ping -n 90 %computername%>nul
GOTO REINSTALL_CLIENT

:REINSTALL_CLIENT
@ECHO Reinstalling Client...
taskkill /IM CMTrace>nul
IF NOT EXIST "%windir%\ccmsetup\logs" MKDIR "%windir%\ccmsetup\logs"
IF NOT EXIST %windir%\ccmsetup\logs\ccmsetup.log ECHO "==========[ ccmsetup script started ]==========" > %windir%\ccmsetup\logs\ccmsetup.log
@ping -n 2 %computername%>nul
start %MYDIR%cmtrace.exe %windir%\ccmsetup\logs\ccmsetup.log
DEL /F /S /Q %windir%\ccmsetup\logs\ccmsetup.log
"%MYDIR%Client\ccmsetup.exe" SMSCACHESIZE=5120 FSP=Primary.mydom SMSMP=Primary.mydom
pause

REM @ECHO Upgrading Client...
REM taskkill /IM CMTrace>nul
REM IF NOT EXIST "%windir%\ccmsetup\logs" MKDIR "%windir%\ccmsetup\logs"
REM IF NOT EXIST %windir%\ccmsetup\logs\ccmsetup.log ECHO "==========[ ccmsetup script started ]==========" > %windir%\ccmsetup\logs\ccmsetup.log
REM @ping -n 2 %computername%>nul
REM start %MYDIR%cmtrace.exe %windir%\ccmsetup\logs\ccmsetup.log
REM DEL /F /S /Q %windir%\ccmsetup\logs\ccmsetup.log
REM "%MYDIR%ClientUpgrade\ccmsetup.exe" SMSCACHESIZE=5120 FSP=SCCM02 SMSMP=SCCM02
REM pause

@ECHO Updating Client...
SET MSIFILE=configmgr2012ac-sp1-kb2854009-x64.msp
SET PAKETNAME=I-SWD_ConfigMgrClient_5.00.7804.1300_MUI_X64
SET SWNAME=ConfigMgrClient
SET SWVERSION=5.00.7804.1300
SET PAKETVERSION=1.0
SET STARTTIME=%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
SET LogName=%STARTTIME%_%PAKETNAME%_%PAKETVERSION%.log
taskkill /IM CMTrace>nul
IF NOT EXIST "%windir%\ccmsetup\logs" MKDIR "%windir%\ccmsetup\logs"
IF NOT EXIST "%windir%\ccmsetup\logs\%LogName%" ECHO "==========[ ccmsetup script started ]==========" > "%windir%\ccmsetup\logs\%LogName%"
@ping -n 2 %computername%>nul
start %MYDIR%cmtrace.exe "%windir%\ccmsetup\logs\%LogName%"
DEL /F /S /Q "%windir%\ccmsetup\logs\%LogName%"
msiexec /update "%MYDIR%%MSIFILE%" /qn /norestart /l*v "%windir%\ccmsetup\logs\%LogName%"
pause
GOTO END

:END
Exit
 
Back
Top