|
1 |
| -Function Set-VMKeystrokes { |
| 1 | +<#PSScriptInfo |
| 2 | +.VERSION 1.0.0 |
| 3 | +.GUID 4b78ccc0-dfb5-44bb-b550-1cfb0b194585 |
| 4 | +.AUTHOR William Lam |
| 5 | +.COMPANYNAME VMware |
| 6 | +.COPYRIGHT Copyright 2020, William Lam |
| 7 | +.TAGS VMware ScanCode |
| 8 | +.LICENSEURI |
| 9 | +.PROJECTURI https://github.com/lamw/vghetto-scripts/blob/master/powershell/VMKeystrokes.ps1 |
| 10 | +.ICONURI https://blogs.vmware.com/virtualblocks/files/2018/10/PowerCLI.png |
| 11 | +.EXTERNALMODULEDEPENDENCIES |
| 12 | +.REQUIREDSCRIPTS |
| 13 | +.EXTERNALSCRIPTDEPENDENCIES |
| 14 | +.RELEASENOTES |
| 15 | + 1.0.0 - Initial Release |
| 16 | +.PRIVATEDATA |
| 17 | +.DESCRIPTION This function sends a series of character keystrokse to a particular vSphere VM |
| 18 | +#> |
| 19 | +Function Set-VMKeystrokes { |
2 | 20 | <#
|
3 | 21 | .NOTES
|
4 | 22 | ===========================================================================
|
|
7 | 25 | Blog: www.virtuallyghetto.com
|
8 | 26 | Twitter: @lamw
|
9 | 27 | ===========================================================================
|
10 |
| - .DESCRIPTION |
11 |
| - This function sends a series of character keystrokse to a particular VM |
12 | 28 | .PARAMETER VMName
|
13 | 29 | The name of a VM to send keystrokes to
|
14 | 30 | .PARAMETER StringInput
|
|
17 | 33 | Enable debugging which will output input charcaters and their mappings
|
18 | 34 | .EXAMPLE
|
19 | 35 | Set-VMKeystrokes -VMName $VM -StringInput "root"
|
20 |
| -
|
21 | 36 | Push "root" to VM $VM
|
22 | 37 | .EXAMPLE
|
23 | 38 | Set-VMKeystrokes -VMName $VM -StringInput "root" -ReturnCarriage $true
|
24 |
| -
|
25 | 39 | Push "root" with return line to VM $VM
|
26 | 40 | .EXAMPLE
|
27 | 41 | Set-VMKeystrokes -VMName $VM -StringInput "root" -DebugOn $true
|
28 |
| -
|
29 | 42 | Push "root" to VM $VM with some debug
|
30 | 43 | ===========================================================================
|
31 | 44 | Modified by: David Rodriguez
|
|
45 | 58 | Keyboard Up, Down, Left Right
|
46 | 59 | .EXAMPLE
|
47 | 60 | Set-VMKeystrokes -VMName $VM -SpecialKeyInput "F2"
|
48 |
| -
|
49 | 61 | Push SpecialKeyInput F2 to VM $VM
|
50 |
| -
|
51 | 62 | #>
|
52 | 63 | param(
|
53 | 64 | [Parameter(Mandatory = $true)][String]$VMName,
|
|
0 commit comments