I figured out what the problem was. I missed a $ in the following command:
esxcli.software.vib.remove.Invoke($esxcliRemoveVibArgs)
Printing the output of $error[0] and $error[0].Exception in the catch block helped pin it down.
I figured out what the problem was. I missed a $ in the following command:
esxcli.software.vib.remove.Invoke($esxcliRemoveVibArgs)
Printing the output of $error[0] and $error[0].Exception in the catch block helped pin it down.