Solved

remote execution on Windows

Posted on 2014-01-06
3
204 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
Comment Utility
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
Comment Utility
0
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article will help you understand what HashTables are and how to use them in PowerShell.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
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…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

772 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

14 Experts available now in Live!

Get 1:1 Help Now