Combreal icon

reset-ccm.ps1

Combreal | PRO | 06/12/25 01:31:28 PM UTC | 0 ⭐ | 8933 👁️ | Never ⏰ | [powershell]
PowerShell |

1.13 KB

|

None

|

0 👍

/

0 👎

#Run as admin to stop the SCClient, reset the Confuguration Manager, refresh the Configuration Manager Policies and restart the SCClient.
 
If (Get-Process -Name "SCClient") { 
    Stop-Process -Name "SCClient"
}
 
Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name ResetPolicy 1
 
$IDMappings = @{
'MachinePolicy'        = '{00000000-0000-0000-0000-000000000021}'; 
'DiscoveryData'        = '{00000000-0000-0000-0000-000000000003}'; 
 #'ComplianceEvaluation' = '{00000000-0000-0000-0000-000000000071}'; #not found
'AppDeployment'        = '{00000000-0000-0000-0000-000000000121}'; 
'HardwareInventory'    = '{00000000-0000-0000-0000-000000000001}'; 
'UpdateDeployment'     = '{00000000-0000-0000-0000-000000000108}'; 
'UpdateScan'           = '{00000000-0000-0000-0000-000000000113}'; 
'SoftwareInventory'    = '{00000000-0000-0000-0000-000000000002}'; 
}
 
ForEach ($IDMapping in $IDMappings.Keys) {
   Write-Host "${IDMapping}: $($IDMappings.$IDMapping)"
   Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule $($IDMappings.$IDMapping)
}
 
Start-Process -FilePath "C:\Windows\CCM\ClientUX\scclient.exe"
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎