VMware Cloud Community
cjscol
Expert
Expert

Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section."

I have a problem running PowerCLI as a non-Administrator user.

When I run Import-Module VMware.VimAutomation.Core I get the following error

Exception calling "OnImportModule" with "2" argument(s): "Error creating the Web Proxy specified in the

'system.net/defaultProxy' configuration section."

At C:\Program Files

(x86)\VMware\Infrastructure\PowerCLI\Modules\vmware.vimautomation.core\VMware.VimAutomation.Core.ps1:1 char:1

+ [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService.OnImportMo ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : ConfigurationErrorsException

I also get the following error when running Connect-VIServer vcenter01

connect-viserver : 19/10/2018 17:08:51    Connect-VIServer        Error creating the Web Proxy specified in the

'system.net/defaultProxy' configuration section.

At line:1 char:1

+ connect-viserver vcenter01

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], ViError

    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Exception,VMware.VimAutomation.ViCore.Cmdlets

   .Commands.ConnectVIServer

A connection to vcenter01 is not established.

If I make the user I am logged on as an Administrator of the Workstation I am running the Powershell from then it works without this issue. Any idea how to resolve this?

Calvin Scoltock VCP 2.5, 3.5, 4, 5 & 6 VCAP5-DCD VCAP5-DCA http://pelicanohintsandtips.wordpress.com/blog LinkedIn: https://www.linkedin.com/in/cscoltock
0 Kudos
5 Replies
LucD
Leadership
Leadership

Judging from the location of the file, you seem to be using an older PowerCLI version.

Which version are you using?

And which vSphere version?


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

0 Kudos
cjscol
Expert
Expert

PowerCLI 6.5R1

vSphere 6.0U3

Calvin Scoltock VCP 2.5, 3.5, 4, 5 & 6 VCAP5-DCD VCAP5-DCA http://pelicanohintsandtips.wordpress.com/blog LinkedIn: https://www.linkedin.com/in/cscoltock
0 Kudos
LucD
Leadership
Leadership

Is there a specific reason you are using that old PowerCLI version?

Your vSphere version is supported in the latest PowerCLI version.

matrix.jpg


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

0 Kudos
cjscol
Expert
Expert

I am not in a position to be able to upgrade the version of PowerCLI and need to get it working with the version currently installed.

Calvin Scoltock VCP 2.5, 3.5, 4, 5 & 6 VCAP5-DCD VCAP5-DCA http://pelicanohintsandtips.wordpress.com/blog LinkedIn: https://www.linkedin.com/in/cscoltock
0 Kudos
LucD
Leadership
Leadership

What does the following return on your station?

Get-Module -Name VMware* -ListAvailable


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

0 Kudos