Friday, April 3, 2009

rescan.bat

This batch file rescans the ESXi hba for new changes. I run this twice from scripts because there is a bug in ESXi that causes you to rescan twice for some hba's:


@echo off

REM --------------------------------------------------------------------------------------------------------------
REM Usage
REM rescan [ESXi Host] [hba]
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 --------------------------------------------------------------------------------------------------------------

perl "C:\Program Files\VMware\VMware VI Remote CLI\bin\esxcfg-rescan.pl" --server %1 --username root --password password %2

No comments:

Post a Comment