I have a repetitive task that I need to automate with a batch or VBscript.
Sometimes I have a list of Windows computers that I need to RDP to then:
-Stop OpenSsh service
-Stop MySQL Service and the dependent service (I cannot remember its name)
-Confirm that the OpenSsh and MySQL and the other independent service are completely stopped
-Gracefully restart the computer.
I need a script that reads off notepad a list of computers, lined up properly in a column, and goes to the top list reads the 1st computer name and executes the tasks I mentioned above.
However I need the script to generate another text file as log file, which will contain for instance:
OpenSsh service stopped
MySQL service stopped
XYZ service stopped
If any of the services cannot be stopped, the script should not reboot the computer, but will log the message in the same text file that this computer has not been rebooted because service XYZ could not be stopped
Any help will be very much appreciated