Take the 2-minute tour ×

I've been using Attachmate Reflection to access several different environments on different servers, and it's been a fairly simple process to record the steps required for each, i.e. open this SSH session, wait for a password, run this program, choose that menu item, start the other interpreter...

I'm investigating using Powershell for this as well, and...I've gotten as far as the SSH step :) Is there a way to automate all those keystrokes, preferably pausing for password entry? Bonus points for being able to record steps as I perform them like Reflection allows.

share|improve this question
add comment

1 Answer

I hate to ask an obvious question, but:

Why would you want to automate by keyboard a scripting engine?

If you've already got a PowerShell script to run what you need, then just run it with powershell.exe -file or -command. If you need to run it remotely, use the built-in command Invoke-Command.

Hope this helps

share|improve this answer
Not sure I fully understand you here (and my question is probably phrased poorly), but I suppose I'll start with the obvious answers :) 1. The remote machines are most (if not all) some flavor of Unix. So this would need to operate over an SSH session. 2. Not everything is simply a command; for example, using arrow keys to navigate interactive menus...so it doesn't look like Invoke-Command can quite cut it, but if you could point me to some reading to the contrary, that would be splendid. –  Cheezmeister Nov 30 '11 at 22:01
add comment

Your Answer


