Hi,
Complete newbie to the VI Toolkit... but I thought the following (copied from a VI Powershell blog) would write the bios.bootDelay value to my test VMs:
connect-viserver testvc
$key = "bios.bootDelay"
$value = "5000"
get-vm test* | foreach {
$vm = Get-View $_.Id
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
$vmConfigSpec.extraconfig[0].Key=$key
$vmConfigSpec.extraconfig[0].Value=$value
$vm.ReconfigVM($vmConfigSpec)
}
However it doesn't do anything more than connect to the VirtualCenter server. Any help appreciated.
Complete newbie to the VI Toolkit... but I thought the following (copied from a VI Powershell blog) would write the bios.bootDelay value to my test VMs:
connect-viserver testvc
$key = "bios.bootDelay"
$value = "5000"
get-vm test* | foreach {
$vm = Get-View $_.Id
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
$vmConfigSpec.extraconfig[0].Key=$key
$vmConfigSpec.extraconfig[0].Value=$value
$vm.ReconfigVM($vmConfigSpec)
}
However it doesn't do anything more than connect to the VirtualCenter server. Any help appreciated.