VMware Cloud Community
preinhart1
Contributor
Contributor

Powercli scripts in GCVE through socks proxy

Hello,

We manage a GCVE environment and we connect to the vCenter through an IAP server running in GCP.  I would like to run some powercli scripts against the environment but I am unable to connect using the same IAP server.  Using the line below in my script, I am able to get a login prompt but I get an error after entering creds, "The ServicePointManager does not support proxies with the socks5 scheme."

[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('socks5://localhost:4080')

Does anyone know of a way to properly connect and run scripts through a proxy?

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Did you try using proxychains to convert the socks5 to an http proxy?
See Solved: Re: [Connect-VIServer], ViError - VMware Technology Network VMTN

I don't have such an environment to test if that works I'm afraid.


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

Reply
0 Kudos