Hello, anybody knows if there are powercli cmdlets for enabling/disabling the VCSA proxy that is avaiable in the VAMI page? I can't find any..
No cmdlets, but you can use the REST APIs since vSphere 6.7
Find documentation here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No cmdlets, but you can use the REST APIs since vSphere 6.7
Find documentation here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
A simple example
$proxy = Get-CisService -Name 'com.vmware.appliance.networking.proxy'
$proxy.get('http') # Other protocols are https and ftp
$config = $proxy.Help.set.config.Create()
$config.enabled = $true
[VMware.VimAutomation.Cis.Core.Types.V1.Secret]$config.password = 'VMware1!'
$config.port = 9512
$config.server = 'http://myproxy.domain'
$config.username = 'proxyUser'
$proxy.set('http',$config)
To remove the proxy setting for a protocol you can do
$proxy.delete('http')
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
many thanks Luc! Unfortunately no 6.7 yet I'll keep it in mind after the upgrade! Cheers!
I know this is an old thread, but one of few I have found that relate to the exact need I have. I do not have CLI access to the VCSA (it is a Google GCVE deployment) BUT I can access via PowerCLI with the admin account.
I do not want to disable HTTPS proxy as it has been configured by Google for a reason, but I need to add a FQDN and IP to the NO_PROXY settings, like below if I had CLI access:
Add the Primary vCenter to the NO_PROXY list in /etc/sysconfig/proxy
Is there a question here?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes - how do I use the 'no_proxy' service to add addition hosts to the list?
I figured it out.
$temp1 = Get-CisService -Name 'com.vmware.appliance.networking.no_proxy'
$servers = $temp1.Help.set.servers.create()
$servers.Add("127.0.0.1")
$servers.Add("localhost")
$servers.Add("testserver.domain.local")
$temp1.set($servers)
$temp1.get()
127.0.0.1
localhost
testserver.domain.local
Correct, make sure to read the instructions at the beginning of the REST API reference for no-proxy PUT.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference