How do I start a service using the WMI library?
The code below throws the exception:
AttributeError: 'list' object has no attribute 'StopService'
import wmi
c = wmi.WMI ('servername',user='username',password='password')
c.Win32_Service.StartService('WIn32_service')
There is documentation regarding the library on github: https://github.com/tjguk/wmi/blob/master/docs/cookbook.rst
I believe the above code is throwing an error because you are not specifying which service to start.
Assuming you don't know what services are available to you:
Once you know the name of the service you want to run:
Hopefully with the documentation, and my code snippets, you'll be able to find your solution.