Error: "Set-VM : Cannot bind parameter 'Version'... due to enumeration values that are not valid." when updating VM hardware version higher than v18
search cancel

Error: "Set-VM : Cannot bind parameter 'Version'... due to enumeration values that are not valid." when updating VM hardware version higher than v18

book

Article ID: 391761

calendar_today

Updated On: 03-25-2025

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

Setting virtual machine hardware to version v19 or higher with PowerCLI fails when using the version parameter.

The following error is observed (example if hardware version 21 is attempted):

Set-VM : Cannot bind parameter 'Version'. Cannot convert value "21" to type "VMware.VimAutomation.ViCore.Types.V1.VM.VMVersion" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. The possible enumeration values are                    "Unknown,v4,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18".

Environment

ESXi 7.0 U2 or higher

Cause

This issue is caused as the version parameter is deprecated and no longer supports hardware version 19 and above.

Resolution

Use the HardwareVersion parameter when updating virtual machine hardware versions.

Additional Information

See the below documentation as reference (Set-VM Cmdlet):

Required Parameter Name Type Description
required
VM VirtualMachine[] Specifies the virtual machine that you want to configure.
optional HardwareVersion String Specifies the version to which you want to upgrade the virtual machine. You cannot downgrade to an earlier version.
optional Version VMVersion This parameter is deprecated. Use the HardwareVersion parameter instead. Specifies the version to which you want to upgrade the virtual machine. The valid values are v4, v7, v8, v9, v10, v11, v12, v13, and v14. You cannot downgrade to an earlier version.