Powershell Tools - Client Repair
Main Menu
>
Tools
>
PowerShell Tools
Client Repair
Handy function to repair a remote client
Download
Code
function repairclient([String] $strComputer) { $SMSCli = [wmiclass] "\\$strComputer\root\ccm:sms_client" $SMSCli.RepairClient() }
Documentation
Launch PowerShell, paste this function at the prompt (you may have to hit return once or twice to get back to your command prompt), and as long as you're in this PowerShell session, you can run the command as follows: repairclient COMPTUER1 (where COMPUTER1 is the remote computer to repair). ** This will run with the same rights as your PowerShell session, which must have proper rights to remotely call this WMI method. ---created by: Greg Ramsey