Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement