Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute WMI script remotely 1

Status
Not open for further replies.

theniteowl

Programmer
May 24, 2005
1,975
US
Hi All,
I am looking to use a VBS script to execute another VBS script on a remote server and have the results of the remote script passed back to the local one.

On the remote server I need to execute a command line utility from a DOS window and return the results.
Currently I have to take the remote desktop connect to the machine and I am looking to avoid that and get the info remotely.
If I can run a local script that executes the command line utility on the remote server and read back the returned text that would be better but I think there would be problems with remote execution and interaction without using scheduled jobs.


At my age I still learn something new every day, but I forget two others.
 
You may look at PSExec.exe which is available from Microsoft...if you're simply running a remote command or need to push out at executable and execute...it may be much easier...I think it would definitely be worth looking into.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Hmm, looks interesting but causes me a couple of problems.
First, the company frowns on any unapproved software being used. Since it is not an installed software I dont think they will notice my using it but I cant make it a readily available solution for my co-workers.

The second problem is that the context it executes under does not allow accessing mapped drives which is what the app uses to point to a file it has to act upon. I have found work arounds for this but I end up opening up a command prompt on the server and issuing multiple steps to complete the process.

It DOES work but it is much less convenient than what I was hoping to achieve. This is entirely due to my particular situation though, the PSExec program is excellent.

In my case the remote machine is logged in under a specific ID. Perhaps I can set PSExec to run in the console mode of the remote and that will clear up my other issues. Will have to test.

Thanks.

At my age I still learn something new every day, but I forget two others.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top