[Show all top banners]

Saajha
Replies to this thread:

More by Saajha
What people are reading
Subscribers
Subscribers
[Total Subscribers 1]

Slackdemic
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Sysadmins- Advise pls.
[VIEWED 1246 TIMES]
SAVE! for ease of future access.
Posted on 06-10-09 4:46 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Greetings..

Can someone bring in some insight into this, and perhaps propose a possible solution? I'll try to be as detailed as I can.

The goal is to:

Successfully run the following on multiple remote machines (all Win2003)

\\localmachine\folder\subfolder\file.bat

(basically mapping back to the local box to execute a batch)

'localmachine' is where I am trying to run psexec from

'localmachine' houses the batch file and other necessary components


So, I have a command prompt (with domain admin priv.); I type in the following:

psexec -u DOMAIN\loginID \\remoteServer -c C:\Folder\subfolder\file.bat

Better yet, for multiple machines:

psexec @listofMachines.bat -u DOMAIN\loginID -e -d -c C:\Folder\subfolder\file.bat



6 out of 15 machines can execute without a problem

Rests don't...



Now, if I RDC into those 9 machines and run the following:

\\localmachine\folder\subfolder\file.bat

Works Great..!



Tried  three versions of psexec



Here's the error (exactly as it appears):

"PSExec could not start file.bat on remoteServer:

The system cannot find the file specified.



The permissions on the folder and files underneath: 'Everyone' Full Control.



Any clue? Perhaps some other alternatives? VBScript?
It could be as simple as running a command remotely on multiple machines (as a scheduled task or realtime: works either way)

PowerShell's been coming along ok so far, but I can't afford to spend much time and resource plunging into it. 

Last edited: 11-Jun-09 05:59 PM

 
Posted on 06-11-09 5:58 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

This one's resolved...
all I had to do was make the remote server run the UNC mapping rather than copying the batch file locally and asking it to execute.

Meaning:

The original command:
psexec @listofMachines.bat -u DOMAIN\loginID -e -d -c C:\Folder\subfolder\file.bat

was modified to:
psexec @listofMachines.bat -u DOMAIN\loginID -e -d \\localServer\Folder\subfolder\file.bat

by removing -c and including the UNC path.

~@~
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 7 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
Driver license help ASAP sathiharu
Nepali **fake** Veterans. Be aware!!
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters