?
Solved

vb.net initiating sccm repair via wmi

Posted on 2014-11-06
3
Medium Priority
?
299 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 1500 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
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 video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

764 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