Solved

vb.net initiating sccm repair via wmi

Posted on 2014-11-06
3
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A hard and fast method for reducing Active Directory Administrators members.
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

737 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