Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function start() { Start-Service MyService // verify service started here }
- function stop() { Stop-Service MyService // verify service stopped }
- function status() { // Return Running/Stopped for MyService }
- ssh user@server powershell.bat
- import wmi
- # Open a connection to a remote machine
- c = wmi.WMI (
- computer="other_machine",
- user="you",
- password="something"
- )
- # start the service
- c.<service>.StartService ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement