Link to home
Start Free TrialLog in
Avatar of AdoBeebo
AdoBeebo

asked on

How to execute a .vbs on a remote server to run on the remote server

I have a .vbs script that I want to run on a remote server by executing a batch on my local machine. Using a sample Hello World script I've got as far as executing the batch on the local machine which calls the remote script and executes it locally, but I want it to run remotely.

Can anyone provide a clear and simple set of code to do this. I've been through a few help articles and not had any success with them, so someone with a working script rather than a link to an article would help.
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AdoBeebo
AdoBeebo

ASKER

Hi RobSampson

I'm going to test it out today and I'll get back to you.

Cheers

AdoBeebo
Sure, let me know how you go.

Rob.
This worked perfectly. I couldn't get it to execute a HelloWorld script, but when I ran it against my original script it worked first time. This is a great solution to a problem that has bugged me for some time, and means that I don't have to RDP to several machines, several times a day to execute a script. Thanks very much!
Hmmm, I wonder why the Hello World test script didn't work....perhaps it's got something to do with the interactivity of the output statements (MsgBox or WScript.Echo).  Does your original script have any prompts that wait for user intervention, or are they fully automatic?  Maybe that's why....

Thanks for the grade.

Regards.

Rob.
My closing comment

"This worked perfectly. I couldn't get it to execute a HelloWorld script, but when I ran it against my original script it worked first time. This is a great solution to a problem that has bugged me for some time, and means that I don't have to RDP to several machines, several times a day to execute a script. Thanks very much!"  

The original scripts are automated scripts that launch Winrunner scenarios. It's no bother really, the important bit is working!