Hi Luc
This is the error that I saw:
The property 'key' cannot be found on this object. Verify that the property exists and can be set.
At /var/software/esxi_expts_powercli/sriovvm.ps1:51 char:5
+ $dev.Device.key = -1
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception calling "ReconfigVM" with "1" argument(s): "Invalid configuration for device '0'."
At /var/software/esxi_expts_powercli/sriovvm.ps1:68 char:5
+ $VM.ExtensionData.ReconfigVM($spec)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
Regards
Jayant