Friday, April 3, 2009

ersh.bat

This batch file will send commands to the ESXi host. These are command line commands to the host vs. vmware-cmd.pl commands as in my vcmd.bat sample.


@echo off

REM --------------------------------------------------------------------------------------------------------------
REM Usage
REM ersh [ESXi Host] "[command]"
REM
REM Be sure to enclose the command in "" marks
REM
REM This batch file assumes that the public private key pairing has been configured on the ESXi Host
REM
REM This batch file will send the [command] to the [ESXi Host] using a private key. This allows a script
REM access to the ESXi Host without the need to login in order to automate tasks
REM
REM This batch file is called from other batch files.
REM
REM DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!!!
REM --------------------------------------------------------------------------------------------------------------
plink -l root %1 -i "x:\path\to\yourkey.ppk" %2

No comments:

Post a Comment