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?
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
PowerCLI 6.5R1
vSphere 6.0U3
Is there a specific reason you are using that old PowerCLI version?
Your vSphere version is supported in the latest PowerCLI version.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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.
What does the following return on your station?
Get-Module -Name VMware* -ListAvailable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference