Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4783
  • Last Modified:

script to uninstall sccm client

Script to uninstall sccm client
0
sms_admin
Asked:
sms_admin
  • 2
1 Solution
 
madhuskCommented:
You can use the following script to uninstall sccm client, just copy all the below script to text file and rename it to .vbs file
0
 
madhuskCommented:
Sorry missed the script, here is the script.

strComputer = InputBox("Enter Machine Name")

strApplicationName = "Configuration Manager Client"

 

Set wshShell = WScript.CreateObject("WScript.Shell")

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

 

Set colSoftware = objWMIService.ExecQuery ("Select * From Win32_Product where Name = '" & strApplicationName & "'")

For Each objSoftware in colSoftware

 

If objSoftware.Name = strApplicationName Then

ApplicationFound = True

MsgBox "Removing The " & strApplicationName & " From " & UCase(strComputer)

objSoftware.Uninstall()

MsgBox "Done"

End If

Next

 

If ApplicationFound <> True Then

MsgBox strApplicationName & " Is Not Installed On "  & UCase(strComputer)

End If
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now