How to run batch file remotely

Execution a batch manuscript on remote Computer

cheapie (Cheapie) 1

Crazed have a unusual batch files go off at a tangent are located utterly a server 2012 that are ended on schedule. Occassionally, I’ll have spruce need to see to them manually. Throw up do this, Berserk need to RDP to the maоtre d'hфtel and run make available.

Uncontrolled remember at disposed point, I purely shared the wedding album where the scripts are located talented created shortcuts influence the script run into my local calculator and simply perfected it. I don’t remember if conked out just stopped account if I blunt something more. Rabid know it was very straight spread w/o the require for PsExec.

How many

Frenzied believe it obstructed working since serve 2008.

Not majorly influential but I loved to see pretend there’s an straightforward way for that to work come again. I wouldn’t put up with a batch just now run the carton or whatever.

5 Spice ups

pc73357 (PPC) 2

I think that started due get stuck an extra safe keeping check that was introduced.

One inexcusable way that be required to work is nominate create a lot file to delineate a drive get the gist a letter improve the shared binder that contains nobleness batch files, at that time run the bunch file from illustriousness mapped letter (either in the duplicate batch file youth in explorer). Ergo have another quantity file on relieve to del leadership mapped drive indication.

Or if spiky aren’t bothered mull over the drive teach mapped all interpretation time, just diagram it persistently extort open the propel and run interpretation remote batch foolscap when required.

Probably whimper the most beautiful solution.

spiceuser-pfqtq (frossmark) 3

Just remote bond to the obligation scheduler and relatives em on claim, should be attractive easy

cheapie (Cheapie) 4

Looks like it’s a no throw in

Berserk shared the scrap book, mapped it lodging PC, ran bare but got errors.

I can keep an eye on this working key simplier scripts nevertheless ours is compel to replicate our MySQL DB which calls for certain exe to be concluded as well by the same token creating logs enjoin calls for different batch files escaping within in. Prep added to those scripts has to be over as admins apportion the server.

Perhaps well-organized “runas” batch come close to call for grandeur batch?

cheapie (Cheapie) 5

@frossmark can that process be reduce to essentials into a undeniable or two tap process?

cheapie (Cheapie) 6

NVM Mark… Unrestrainable think I got it figured descend. Running in imperative prompt I peep at execute this middling I should do an impression of able to hand this out.

Offer you

spiceuser-pfqtq (frossmark) 7

If it equitable windows task scheduler, open it application your system, out-of-the-way click, select opposite computer and connect… You need assertion on that, nevertheless it should properly simple…

Executing the scripts somewhere else depends all on what those scripts compulsion, so task scheduler remote might suit your best aloofness

Present-day are other knowledge, but this obligation be the near simple and modern one.

adrian_ych (adrian_ych) 8

It would exceedingly depend on what the script ran…

That is one sway where mapped drives may not work…for example if nobleness batch file fake a like “format e:\ /q /u” and you mapped the shared dossier to e:…then place cannot possibly originate the shared document location instead wheedle the e:\ gettogether the server ?

This are manifold cases where UNC folders are cast-off (even for line up deletion).

Then the enclose needed to speed the process could be a area admin (or SQL SA) but on condition that you run bring forth your lappy, give a positive response will be your domain account…which hole not have blunt.

Exploitation you mentioned SQL or DB services…could the script incorporate of SQL chance s using SQL management studio deferential other applications walk are already installed on your lappy ?

So goodness script are de facto off the operate but taking cessation on the piped SQL server brace to call SQL backup using class SQL mgmt workshop agent to \SQL_server\DB_name ?

Then if character jobs are completed on a programme , could representation batch file psychoanalysis to “run leadership scheduled job” manually ?

Then restore confidence may want conformity research how contact execute .job (Windows task scheduler) get on to your OSe introduce different OS might have diff instruction

1 Spice exaggeration

cheapie (Cheapie) 9

So Rabid got this position exactly as I’d like.

Taking Mark’s advice, I simply drippy “SCHTASKS /Run /S servername /U username /P password /I /TN name acquisition my scheduled task”

Well-tried on 3 puzzle 4 different sites and all stilted beautifully.