Solved

vb.net initiating sccm repair via wmi

Posted on 2014-11-06
3
279 Views
Last Modified: 2014-11-12
Attempting to run a client side sccm repair with below code, it acts like it runs but no repair happens:

        Dim answer As New MsgBoxResult
        answer = MsgBox(("Are you sure you want to reboot workstation: " & targetpc & "?"), MsgBoxStyle.YesNo, "Confirm Action")
        If DialogResult = DialogResult.Yes Then
            Dim smsClient As Object = GetObject("winmgmts://10.555.1.10/root/ccm:SMS_Client")
            smsClient.RepairClient()
        Else
            Exit Sub
        End If

Open in new window

0
Comment
Question by:derek7467
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40428648
What version of WMI are you using?

If I look at the documentation for SMS_Client on TechNet, I don't see the RepairClient method (article from 2009).

SMS_Client Client WMI Class
http://msdn.microsoft.com/en-us/library/cc146352.aspx
0
 

Author Comment

by:derek7467
ID: 40429061
ahh weird, i was trying to convert vbs into vb.net. I took a look at that site and do not see a repair option.  You know of any way to initiate a remote sccm repair?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40429354
No, I don't.  Everything points to the root/ccm:SMS_Client namespace, but I don't see that anywhere.  It has to be related to a particular software application installation.  You should be able to see the namespaces from the Servers node on the Servers Explorer dialog.

1) Expand the local machine

2) Right-click on the Management Classes, and select Add Classes...

3) On the left is a list of available namespaces.
Snapshot.png
0

Join & Write a Comment

Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now