Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Remove-VIB($vmhost, $vib) {
- if (!($vmhost) ) {$vmhost = read-host -Prompt "VMhost"}
- if (!($vib) ) {$vib = read-host -Prompt "VIB name"}
- $esxcli = Get-VMHost $vmhost| Get-EsxCli -V2
- if ($esxcli.software.vib.get.Invoke(@{'vibname'=$vib}) ) {
- write-host "Found vib $VIB on $VMHost, deleting."
- $ESXCLI.software.vib.remove.invoke(@{'vibname'=$vib})
- }
- else {
- write-host "VIB $VIB not found on $VMHost, exiting."
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement