Solved

PSEXEC and Scripts

Posted on 2010-09-23
4
1,504 Views
Last Modified: 2012-05-10
I have a windows server 2008 R2  machine that is in a workgroup.  I'm trying to run a vbscript I wrote and it keeps telling me it can't find the file.  I copied the file over earlier when connected to the file share.  I have enabled winrm on the machine and all firewall rules.  I also tried using psxec -c "filename" to copy the file over again and try running, same result.  I run psexec \\server-name -u user -p password cmd.exe, that works, I then say run the file and it runs it.  I have a fair number of machines and would like to just run the scripts from the command line with one psexec command not from an interactive command prompt, but it never sees the file (i've checked the name of the file and path ad nauseum, just doesn't find it).  Any one have ideas?
0
Comment
Question by:bmcquill
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 500 total points
ID: 33741695
did you try using

psexec \\server-name -u user -p password cscript "path_to_vbs_file\vbs_file.vbs"
0
 

Author Closing Comment

by:bmcquill
ID: 33741712
That was it, I just totally forgot the cscript parameter in the command line.  Thanks!
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 33741717
you're welcome :)
0
 

Author Comment

by:bmcquill
ID: 33744005
Not that I want to continue this thread too unnecessarily, but it's really strange to me that forgetting the cscript parameter, gave a "file not found" error, instead of a execution failure.  That's what really had me fooled, I haven't seen that before, wonder why that was the case, anyway.
0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Suggested Solutions

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now