Is it possible to send commands into vms which are not configured with vmwaretools using invoke-vmscript?
I have some where listened in vmware world sessions given by William Lam.
If possible can some one share the cmdlets examples.
You are probably referring to William's VMkeystorkes.ps1 script in Automating VM keystrokes using the vSphere API & PowerCLI
It's as if you are typing at the console of the guest OS of the VM.
But it is not really fit for sending and running large scripts.
You also have to know where to send what.
I use that function in my Deploy Photon 2.0 – Part 1 post to reset the password of the root account of the Photon OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
To my knowledge, they must have VMware Tools installed. Why would you *not* have VMware Tools installed? It's far more important than just being able to send keystrokes.
You are probably referring to William's VMkeystorkes.ps1 script in Automating VM keystrokes using the vSphere API & PowerCLI
It's as if you are typing at the console of the guest OS of the VM.
But it is not really fit for sending and running large scripts.
You also have to know where to send what.
I use that function in my Deploy Photon 2.0 – Part 1 post to reset the password of the root account of the Photon OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Chip, my Photon deployment post shows at least 1 use case for being able to send key strokes.
When Photon comes up the 1st time it prompts for a new password.
Even though VMware Tools are installed, I can't use Invoke-VMScript to enter the new password.
That can only be done from the console.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So then yes, Set-VMKeystrokes doesn't require VMware Tools to be installed or available since it's using an API method, but you do have a dependency on the version of vSphere (6.5 minimum).
Thanks The scripts shared are helpful.