Skip to content

Instantly share code, notes, and snippets.

@Mierdin
Created January 19, 2014 06:33
Show Gist options
  • Save Mierdin/8501227 to your computer and use it in GitHub Desktop.
Save Mierdin/8501227 to your computer and use it in GitHub Desktop.
Quick snippet of PowerShell/PowerCLI that leverages the remote esxcli capabilities to install a vib. Credit to James Bowling (vSential) of http://vsential.com/
$esxhosts = Get-VMHost | Sort-Object Name
Foreach ($esxhost in $esxhosts)
{
Write-Host "Starting install on $esxhost..." -ForegroundColor Green
$esxcli = Get-EsxCli -VMHost $esxhost
$esxcli.software.vib.install($null,$false,$false,$true,$false,$true,$null,$null, "/vmfs/volumes/NFS-01/_offlinebundles/net-enic-2.1.2.42-1OEM.550.0.0.1198611.x86_64.vib")
$esxcli.software.vib.install($null,$false,$false,$true,$false,$true,$null,$null, "/vmfs/volumes/NFS-01/_offlinebundles/scsi-fnic-1.6.0.5-1OEM.550.0.0.1198611.x86_64.vib")
Write-Host "Install completed on $esxhost..." -ForegroundColor Red
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment