VMware Cloud Community
burvil
Enthusiast
Enthusiast

Configuring VimApiUrl and VimWebServicesUrl with PowerCLI in VCSA

I know I can do the following in the web client:

Fix URL properties for vCenter. Go to Home -> vCenter Inventory  vCenter Server  Manage  Settings  Advanced Settings  Edit -> Advanced Settings and configure the following.

  1. Set VirtualCenter.VimApiUrl to use https://redacted:443/sdk  vCenter server.
  2. Set VirtualCenter.VimWebServicesUrl to use https://redacted of vCenter server.

How can I do this in PowerCLI?  I am using PowerCLI 6.0, and VCSA/Vsphere 6.0.

0 Kudos
1 Reply
LucD
Leadership
Leadership

Try something like this

Get-AdvancedSetting -Entity $global:DefaultVIServer -Name VirtualCenter.VimApiUrl |

Set-AdvancedSetting -Value ' https://redacted of vCenter server' -Confirm:$false

Get-AdvancedSetting -Entity $global:DefaultVIServer -Name VirtualCenter.VimWebServicesUrl |

Set-AdvancedSetting -Value ' https://redacted of vCenter server' -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos