locked
Managing a remote computer using C# or Powershell RRS feed

  • Question

  • HI,

    I want to automate the below process: please help

    1. Logging in to a remote machine (windows)
    2. open cmd, execute commends like ipconfig, nslookup in remote computer
    3. copying that result to my local machine.
    4. opening a program in remote computer take screenshot.
    5. Mainly controlling the program in remote computer.

    Please let me know how to do this?

    I am unable to find any best API for managing a remote machine from local machine.

    I am doing this project because of the results like.

    1. Rename servers in real time.
    2. Rebuild servers in real time.
    3. Taking the current configuration of servers.

    My project helps a lot in real world.

    Please tell me a way to accomplish the above.
    Tuesday, July 9, 2013 10:05 PM

Answers

  • Hi,

    Do you need to be able to open programs and click buttons, or just run cmd/PowerShell commands? Although I haven't tested it myself, I have heard of ways to run PowerShell commands remotely and automate them with a script if you wanted to.

    Doing a quick search, I came across this article, that explains the process to enable remote PowerShell commands. This should work for your needs, as PowerShell is extremely versatile. If this isn't what you need, It will be a lot harder to accomplish your goals, as you would need to click buttons and generally manipulate a GUI, which is not made to be automated easily. The only other method that I can think of would be to have an app running on the remote computer and to have it send user input commands to the target window.

    If I do not understand correctly and you are looking to just manually accomplish these tasks remotely, a remote desktop session should be what you are looking for.

    Hope this helps!

    Thanks,


    Wasabi Fan

    • Marked as answer by Bob Shen Thursday, July 18, 2013 8:15 AM
    Tuesday, July 9, 2013 11:43 PM