I want to be able to execute a command prompt on a remote server, and I need to issue several commands in the console and capture the output - I would like to return that output back to me.
This looks like how to execute the command prompt locally (not adding in the commands that I wish to run with in the console.) I have read somewhere on SO yesterday on how to do that part. Now what I would like to do is open the command prompt on the remote computer, run a specific executable (from a specific remote folder) with in the console(command Prompt); basically the executable processes some files, and then return the output of that command back to my application.
The console does not need to appear to the user - it just needs to run and exit when I am done, however since I am going to be programmatically writing execution commands in the console - I am not sure that processInfo will work and that I need either PSExec or WMI.
I have read this: Executing command in command prompt with redirection on a C# .aspx page
How can I accomplish my goal of remotely executing the console and interactively adding commands to the console and retrieving the output?
In regards to PowerShell - it has to be enabled on the remote computers. "Because PowerShell Remoting presents a security risk, it has to be enabled even within an Active Directory domain. " I do not want to require my user to do this - they know a username and password for the administrative accounts.