Need to power on VM and send some keystrokes to the VM Guest Console to finish the boot process


I am trying to script the powering on of all our Citrix VM Gold servers since this can be a time consuming process because we have so many of them. Powering them on using Powershell is a breeze, but the problem is they boot to a DOS menu, and I need to send some keystrokes to the VM guest console to finish the boot process. I really just need to send a "1" and "Enter". I thought this would be a simple thing to do, but I have not been able to find a way to do this using Powershell, or any other scripting method for that matter.

I found some older posts about using VNC, but that really isn't an option.

Perhaps I'm just overlooking the obvious, I don't know, but any suggestion would be appreciated.

0 Kudos
1 Reply

I assume the VMware Tools are installed ?

If yes, you could try the following:

  • Use Invoke-VMScript to launch a script in the guest OS
  • In the script use something like this to send the keystrokes

$wshell = New-Object -ComObject
$wshell.AppActivate('Window Title')
Sleep 1

But I have to admit I haven't tried this myself yet :smileycry:

Blog:  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos