Solved

vb.net initiating sccm repair via wmi

Posted on 2014-11-06
3
294 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
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…
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…

690 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