This works fine for me, but I receive an error upon opening the CPU portion of the edit settings GUI for the VM that was changed. Any ideas? Adjusting it manually in the GUI doesn't produce the errors.
$spec = New-Object -Type VMware.Vim.VirtualMachineConfigSpec -Property @{"NumCoresPerSocket" = 3}
(Get-VM Test5).ExtensionData.ReconfigVM_Task($spec)
error -
Number of cores per socket cannot be greater than number of virtual CPUs