strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service WHERE Name LIKE 'myservicenamelike%'")
Set Shell = WScript.CreateObject("WScript.Shell")
For Each objService in colListOfServices
If objService.State = "Running" Then
commandLine = "Net Stop """ & objService.Name & """"
Set oExec = Shell.Exec(commandLine)
End If
Next
Set Shell = Nothing
Lien vers le fichier : cliquez ici