If you use Linux, and you need to restart a Windows service, you don’t need to logon to a Windows machine.
You just need to run the following commands:
net rpc service stop SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD
and
net rpc service start SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD
If you don’t know the Service name, you can list the available services with:
net rpc service list -I IPADDRESS -U USERNAME%PASSWORD
Just a little head’s up. You will need the samba-common package installed in your Linux box.