Via samba is possible to remotely restart a service on your Windows pc from your Linux machine.
In order to use this command, you’ll need to make sure that you have the
samba-common package installed for Ubuntu or any Debian-based Linux.
sudo apt-get install samba-common
Now you can list the services available on a Windows machine by using
the following command, making sure to use credentials that have
administrative privileges on the remote machine:
net rpc service list -I IPADDRESS -U USERNAME%PASSWORD
To stop the service:
net rpc service stop SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD
Then you can start the service again with the following command:
net rpc service start SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD