Solved

remote execution on Windows

Posted on 2014-01-06
3
211 Views
Last Modified: 2014-01-12
I have an a program which I want to run on remote Windows servers. I heard that it was possible to do this using Windows PowerShell, however tried to play around with it and did not succeed.
Can anybody help - is it indeed possible to execute programs remotely using PowerShell? and which setup is needed on the remote server to do this?
0
Comment
Question by:Miritm
3 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 39760580
psexec \\<server> cmd will run the command prompt on the remote server.

psexec \\<server> "c:\app.exe" (quotes needed only if spaces in name) will run an application that resides on the remote servers C: drive.

Is that what you are after?
0
 
LVL 18

Expert Comment

by:Raheman M. Abdul
ID: 39760591
0
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
ID: 39760611
It's certainly possible to do this with PowerShell (and with PsExec as mentioned by pony10us).  PowerShell Remoting is what you're after.  There's a good amount of help built in to PS that goes over remoting.  Here's a few help topics.
about_Remote
about_PSSessions
about_Remote_Disconnected_Sessions
about_Remote_Requirements
about_Remote_FAQ
about_Remote_TroubleShooting
about_Remote_Variables
Enter-PSSession
Invoke-Command
New-PSSession

A good link for learning.
http://blogs.technet.com/b/heyscriptingguy/archive/2012/07/23/an-introduction-to-powershell-remoting-part-one.aspx
(there's four other parts as well)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
A brief introduction to what I consider to be the best editor for PowerShell.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

777 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