Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Remote execution via PowerShell #50

Open
FermJacob opened this issue Oct 15, 2019 · 0 comments
Open

Remote execution via PowerShell #50

FermJacob opened this issue Oct 15, 2019 · 0 comments
Assignees
Labels
Projects

Comments

@FermJacob
Copy link
Collaborator

There are instances (especially in the Financial Services sector) where commands must be executed on a specific machine (such as batch processing). Powershell provides us the ability to execute commands on the local AND/OR remote machines, in both synchronous and asynchronous modes.

A nice primer article is at:
https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/

Remote execution is more interesting, depending on if we have access to Powershell 5.0. In 5.0, a new remote execution capability was added to Powershell and the API that goes with it. In versions before 5.0, the Invoke-command Powershell command can be used on the local powershell to execute a command of the remote machine. In 5.0, most commands can communicate with an open session in PS.

Another option is to go DIRECTLY to the remote machine. A better solution, as it does not require PS installed on the local machine. A primer is available at:https://com2kid.wordpress.com/2011/09/22/remotely-executing-commands-in-powershell-using-c/

Another good reference: https://msdn.microsoft.com/en-us/library/ee706591(v=vs.85).aspx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Backlog
  
To do
Development

No branches or pull requests

2 participants