SCCM (ConfigMgr) Client Repair - Command Line/ VB script / Powershell
On Error Resume NextDim oCPAppletMgr Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")Dim oClientActions Set oClientActions = oCPAppletMgr.GetClientActions() Dim oClientAction For Each oClientAction In oClientActions If oClientAction.Name = "Request & Evaluate Machine Policy" ThenoClientAction.PerformAction End IfNext
On
Error
Resume
Next
Dim
oCPAppletMgr
Set
oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
oClientActions
oClientActions = oCPAppletMgr.GetClientActions()
oClientAction
For
Each
In
If
oClientAction.Name = "Request & Evaluate Machine Policy" Then
oClientAction.PerformAction
End
function repairclient([String] $strComputer) { $SMSCli = [wmiclass] "\\$strComputer\root\ccm:sms_client" $SMSCli.RepairClient() }
function
repairclient([String] $strComputer) { $SMSCli = [wmiclass] "\\$strComputer\root\ccm:sms_client" $SMSCli.RepairClient() }