Monday, August 4, 2008

Vbs Script To Repair A Remote SMS Client With Error Handling

Vbs Script To Repair A Remote SMS Client With Error Handling

This is a modified version of my original post from last year entitled: Vbs Script To Repair A Remote SMS Client with error handling provided for Advanced clients.

Note: After the script has executed review the CcmRepair log file to verify its success.

VBS Script:

On Error Resume Next

strComputer = InputBox("Enter Client Machine To Repair")
Set SmsClient = GetObject("winmgmts://" & strComputer & "/Root/Ccm:SMS_Client")

If Err <> 0 Then
MsgBox "Error: " & "(" & Err.Number & ") " & Err.Description

Else
SmsClient.RepairClient
MsgBox "Repair Is In Progress For " & UCase(strComputer)

End If

No comments: