Uninstall RMM agent service remotely

Hi

Please use below procedure to uninstall RMM agent service remotely,


import os
temp=os.environ['TEMP']

vbs='''
Dim sCmd1
Dim sCmd2
Dim sCmd3
Dim WshShell

On Error Resume Next
sCmd1="wmic product where name=""RMM Agent Service"" call uninstall"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run sCmd1,0, True
WScript.Sleep 10
'''

with open(temp+r'\uninstall.vbs',"wb") as f :
    f.write(vbs)        

print os.popen('cscript.exe "'+temp+'\uninstall.vbs"').read()

print('RMM Agent successfully uninstalled')

if os.path.isfile(temp+r'\uninstall.vbs'):
    os.remove(temp+r'\uninstall.vbs')





20170520-Uninstall–RMM-agent-remotely.json (1.05 KB)