So you need powercli (or perl SDK) for this. You need to create a devicechange spec and apply the spec with "ReconfigVM_task call.
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.deviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec[] ($numberOfdisks)
Then goes through a loop and add all disks:
$spec.deviceChange[$i] = New-Object VMware.Vim.VirtualDeviceConfigSpec
$spec.deviceChange[$i].operation = "add"
$spec.deviceChange[$i].device = New-Object VMware.Vim.VirtualDisk
$spec.deviceChange[$i].device.backing = New-Object VMware.Vim.$backing
$spec.deviceChange[$i].device.backing.fileName = "$Diskfile"
$spec.deviceChange[$i].device.backing.diskMode = "independent_persistent"
$spec.deviceChange[$i].device.connectable = New-Object VMware.Vim.VirtualDeviceConnectInfo
$spec.deviceChange[$i].device.connectable.startConnected = $true
$spec.deviceChange[$i].device.connectable.allowGuestControl = $false
$spec.deviceChange[$i].device.connectable.connected = $true
$spec.deviceChange[$i].device.controllerKey = $ctrlKey
$spec.deviceChange[$i].device.unitNumber = $unit
finally, make the API call:
$vm.ReconfigVM_Task($spec)