esxi-patch-install.ps1

esxi-patch-install.ps1

here is a ESXI 4.1 update script

How To use the script:

-download and unzip the update file

-locate the metadata.zip and place that in a sub folder of the datastore you configure in the script

-run script

this script has:

-remote ESXI Login (fixed of 4.0.1)

     -user name prompted

     -password prompted

     -in a encrypted way

-file install from a Datastore

-promps for user to put esxi into manance mode

-adds a switch/loop so that the script can have new things added to it easily.

(known issues)

but when you run the script it crashs powershell but shows the progress in the vi client (64 bit of power cli only)

Attachments
Comments
$password=Read-Host -assecurestring "what is your password?"
is better than showing the password in clear text and then using Clear-Host.

i tried that line... but the issue is the connection line does not like the "-assecurestring" because the "$Password records the "*" as it's value witch is not what the password is for the esxi box so the authentication fails

best option is to use $host.ui.PromptForCredential() to get both the username and password, the result of which Connect-VIServer can take via its -Credential option

How would I code that into the script? Nevermind got it deployed now in the script version 4.0.1

Version history
Revision #:
1 of 1
Last update:
‎02-26-2011 06:06 PM
Updated by: