FIX SCCM Client Installation issue :CcmSetup failed with error code 0x80041010

  1. Open a command prompt
  2. Change to directory C:\Windows\system32\wbem\
  3. Run: dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

It will fix the WMI issue for invalid class

Advertisements

Steps to how to Deploy .MSP update using PsExec.exe and msiexec.exe

Under below steps will cover the Adobe Reader update 11.0.23_Update (AdbeRdrUpd11023.msp)

Step 1- Download the latest update (.MSP) from below link.

https://supportdownloads.adobe.com/product.jsp?product=10&platform=Windows

Step 2- Create a Share folder on server from all servers can access the share (Ignore if you have already shared folder)

Example Share : \\ABCD\11.0.23_Update\ (Physical path \\ABCD\C$\Temp\11.0.23_Update)

Step 3 – Copy the installer at share location (AdbeRdrUpd11023.msp)

Step 4 – Create a .bat file as below and place at same location. (AdobeUpdate.bat)

@Echo Off
msiexec.exe /p “\\ABCD\11.0.23_Update\AdbeRdrUpd11023.msp”/qn

Step 5 – Copy the PsExec.exe at desired location and run the CMD from that location.(C:\Temp)

Step 6 – Run the below command for single remote computer (XYZ).

C:\Temp\PsExec.exe \\XYZ -u Domain\user name -c -f  “\\ABCD\11.0.23_Update\AdobeUpdate.bat”

This will ask you the password for mentioned user.

Success result : AdobeUpdate.bat exited on XYZ with error code 0.

Step 7 – Run the below command for multiple remote computers (create a text file and place the list of servers) (C:\Temp\Servers.txt)

C:\Temp\PsExec.exe @Servers.txt -u Domain\user name -c -f  “\\ABCD\11.0.23_Update\AdobeUpdate.bat”

This will ask you the password for mentioned user. (One Time Password Prompt )

Success results for all servers inline:

AdobeUpdate.bat exited on XYZ with error code 0.

Process to add PowerShell script in “Local Security Policies” under Startup/Shutdown script.

Please find the below steps to complete the task.

  • Create desired script with requirement (i.e. C:\Script\Stop-Service.Ps1)
  • Navigate the following path :Run->gpedit.msc->Computer Configuration->windows Settings->scripts
  • Select desired option where you need to apply the Script (Startup or shutdown). In this case applying the script under Shutdown process.
  • Double Click on shutdown option.(below window will appear)

GP1

 

  • Click on PowerShell Script tab and click on Add button to browse the desired script.

 

GP2

  • Select the script run order.
  • Navigate the following path :Run->gpedit.msc->Computer Configuration->Administrative Templates->System->Scripts
  • Enable the “Run Windows PowerShell scripts first at computer startup, shutdown”

 

 

 GP3

 

Steps to set the time limit for scripts

 

Requirement: – If you need to run the script for some time and if that exceed that limit than initiate the shutdown.

Please find the below steps to complete the task.

  • Navigate the following path :Run->gpedit.msc->Computer Configuration->Administrative Templates->System->Scripts
  • Enable the “Specify maximum wait time for group policy script” and specify the time limit in seconds (from 1 to 32,000). If you disable or do not configure this setting the system lets the combined set of scripts run for up to 600 seconds (10 minutes). This is the default.