Hello friends. Tell me how to transfer certain characters to the guest machine (windows 7, 2008R2) using POWERCLI ?, When starting it, it asks to enter an encryption key. Here it is and pass the guest machine from the script.
You can use WIlliam's function in his Automating VM keystrokes using the vSphere API & PowerCLI post
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can use WIlliam's function in his Automating VM keystrokes using the vSphere API & PowerCLI post
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
One additional remark, you have to make sure that the VMware Tools are installed and running.
The best way to test if the guest OS is ready to receive keystrokes is by looking at the
Get-VM |
Select Name, @{N = 'Ready'; E = { $_.ExtensionData.Guest.GuestOperationsReady } }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You will have to dot-source the function before the PS engine knows about it.
One way of doing that, copy the code of the function into a file with a .ps1 extension.
Let's assume the file is named Set-VMKeystrokes.ps1, and the file is stored in the directory into which you are currently located.
Then from your PS prompt, do
. .\Set-VMKeystrokes.ps1
Note the blank between the 2 dots!
Once done you can now call the function Set-VMKeystrokes.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference