Solved

remote execution on Windows

Posted on 2014-01-06
3
206 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

Are your end users making ugly email signatures?

Have you left it up to your end users to create their own email signatures? Are they forgetting to add the company logo or using garish font colors? Take control and ensure all users have the same email signature.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
A procedure for exporting installed hotfix details of remote computers using powershell
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

911 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

24 Experts available now in Live!

Get 1:1 Help Now