Hi all,
I can't figure this out, hopefully it's a real simple thing to do. I need to change the name of the vCenter, like what is in the screeny below, but through powershell code
can anybody show me how that is done?
Cheers!
Depending if you have vCenter, Update Manager and License server all running on the same host this not a simple operation.
See for example KB1006843.
To emulate the Rename as can be done from the vSphere Client is straightforward.
You need to be connected to the vCenter.
$optMgr = Get-View (Get-View ServiceInstance).Content.Setting $optVal = New-Object VMware.Vim.OptionValue $optVal.Key = "VirtualCenter.InstanceName" $optVal.Value = <new-vCenter-name> $optMgr.UpdateOptions($optVal)
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Depending if you have vCenter, Update Manager and License server all running on the same host this not a simple operation.
See for example KB1006843.
To emulate the Rename as can be done from the vSphere Client is straightforward.
You need to be connected to the vCenter.
$optMgr = Get-View (Get-View ServiceInstance).Content.Setting $optVal = New-Object VMware.Vim.OptionValue $optVal.Key = "VirtualCenter.InstanceName" $optVal.Value = <new-vCenter-name> $optMgr.UpdateOptions($optVal)
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc, worked perfectly!