Execute Batch File After Tfs Build Server
The scenario: you are using TFS 2010 as your build server, and you would like to deploy files to a remote server upon successful build by invoking a batch file. Do note that the. On TFS my batch file execution does not seem to happen, neither am I getting the echo message nor the notepad.exe opening. Lets take this line apart: the first 'powershell' starts the script - which immediately starts another script (using start-process). The -ArgumentList is used to pass arguments to the script. -NoExit tells powershell to remain open after the execution finished (so we can check the output). On a build-server you dont.
I have few computers connected to the network and I want to create batch files to automatize the process of working with them. I have already created one used to shutdown computers at once. It is very simple I ll just post it for the sake of argument.
Now I want to execute programs on these machines. So lets say there is 'example.exe' file located 'Slave1-PCdexample.exe'
using
runs it on my computer through network and i didn't come up with anything else. I dont want to use any psexec if possible. Help would be much appreciated.
Peter
Apocalypto dual audio hindi download. Chrysler Crossfire 2004 2008 Workshop Service Manual Repair.Brunton Adc Summit Manual Pdf As regards what defines 'smart tech', this article will primarily cover the use.Louie measures the breeze with our Brunton ADC Pro combo altimeter/clock/thermometer/anemometerBut we'll blog the ADC later, after we're done studying the 73 page manual Manual and automatic data loggingview and download brunton adc summit user manual online brunton adc summit.
migrated from stackoverflow.comSep 22 '12 at 21:49
This question came from our site for professional and enthusiast programmers.
2 Answers
If you really can't use psexec, then you could probably rig something up with schtasks (better) or at (worse).
However, I think you'd probably spend more time trying to get those to do what you want than you'd spend in setting up PsExec. Psexec is really quite simple to use and it only needs to be available (as an executable file; no installer needed) on the machine doing the controlling, not on each machine being controlled.
At its simplest, PsExec is very simple:
Also, Mark Russinovich (PsExec's author) has written a primer that 'describes how PsExec works and gives tips on how to use it'. Beyond that, 'PsExec /?' and the manual do provide quite good information.
PSEXEC is very easy and simple to use. You use it basically in the same way you use CALL or START (except you give it the target computer and a username and password if needed), and is capable of even launching GUI applications, though you won't be able to see or control it.

When used to launch a command-line program with normal STDIN / Console input and STDOUT and STDERR output, the program or batch file will act as if you are simply running it on your own machine.
I was up and using PSEXEC to run diagnostics, defrag.exe, anti-virus programs, and for gathering system information in a shop with over 2,000 PC's without more introduction than PSEXEC /? within a day.
Run:
And you've got the same interactive Command Prompt on COMPUTER that you'd have if you walked over and typed ALT+RCMDENTER. Maybe a little slower, but it's not noticeable unless you're scrolling through a massive amount of text. Even over 10 Base-T it's not too bad.
As an Network Administrator able to use the same username / password on nearly every computer, I found that all but the most locked down computers, I didn't even need to use a username or password. This..
..was usually sufficient.
To use your example type:
Or:
PSEXEC will prompt you for a username and password if they are needed.
The first time you connect to a computer you may need to (or get someone else to) allow the connection via a Pop-Up on the remote system.
I have a batch file which stops a service and deletes a file from d: drive.I want to execute this on 20 servers.Is there a quicker way than manually logging on each server, copying and running batch file?
Batch File Execute Multiple Commands
migrated from stackoverflow.comFeb 25 '10 at 20:16
This question came from our site for professional and enthusiast programmers.
3 Answers
You could try using PsExec. If the batch file is present in all machines at same location, then you could mention the list of machines in a text file and give it as an argument to this.Something like,
If you dont have it on remote machine, you need to copy the batch file and then execute it using,
May I suggest writing a single local script that:
- Uses
net start/startserver to start/stop service remotely. - Deletes a file on
serverd$..
You can iterate over a list of server names and run those 2 commands.
You could use psexec from sysinternals http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx