Here is my final version of script that stops services selects a loaded window making it active, presses ESC 3 times, encrypts credentials, use these credentials on a remote computer to run a .bat file (which ends by restarting the remote computer), it then pings the remote computer and when it gets a response it starts a service on the remote computer, and then starts a process (opening a program) and applying arguments to the program.