Jeff Wouters's Blog

PowerShell function to remotely repair a SCCM client

by on Nov.22, 2011, under Microsoft, PowerShell, SCCM, Script

A few minutes ago I came across this post: PowerShell Script: SCCM Health Check

Which got me thinking… what about writing a simple function to repair a SCCM client which you can provide your service desk or local support employees just in case you don’t want to provide them access to a SCCM Management Console.

Well, here is it:

# Usage: SCCM-RepairClient <TargetName>
function SCCM-RepairClient([String] $strTargetName)
{
$SCCMClient = [wmiclass] "\\$strTargetName\root\ccm:sms_client"
$SCCMClient.RepairClient()
}


1 Comment for this entry

Leave a Reply