VMware Cloud Community
vMcRon201110141
Contributor
Contributor

Connect-viServer issue with PowerCLI 6.3 R1

I am troubleshooting a PowerCLI authentication/connection issue.

I have a service account that can connect to my 6.0 U2 VCSA using PowerCLI 6.0 R3 and the connect-viServer cmdlet.

The same service account cannot connect to the same 6.0 U2 VCSA using PowerCLI 6.3 R1 and the connect-viServer cmdlet.

When using 6.3 R1, I get the following error:

PowerCLI C:\> connect-viServer <VCSA_NAME>
connect-viServer : Permission to perform this operation was denied.
At line:1 char:1
+ connect-viServer <VCSA_NAME>
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], VimException
    + FullyQualifiedErrorId : VMware.Vim.VimException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

PowerCLI C:\>

Using an account with the Admin role, I can connect to my 6.0 U2 VCSA with either version of PowerCLI.

Any ideas on differences between PowerCLI 6.0 R3 and 6.3 R1 that might cause this issue?

Thanks in advance for any assistance.

0 Kudos
6 Replies
jpsider
Expert
Expert

‌iI've seen this too! No solution yet when messing with each of the permissions, I'm interested to know if someone has solved this as well. The older versions of powercli do work just fine.

0 Kudos
LucD
Leadership
Leadership

Did you already check the privileges on the role that you use for that service account?


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

0 Kudos
FreddyFredFred
Hot Shot
Hot Shot

Just ran into this issue today with a user who wanted to use powercli for the first time. Same error message as you with 6.3 R1. I had them uninstall 6.3R1 and then install a 5.5 version and then everything was fine.

I'm guessing this is related to the same issue vcenter 6 has with web client permissions and users not being able to see things (ie. permissions just stop working even though they are still set) but in windows client everything is fine. Might need to add all kinds of read-only permissions at a bunch of different levels although users are then able to see things I prefer they not see

0 Kudos
hsimah
Contributor
Contributor

I just upgraded PowerCLI from 6.0 R2 to 6.3 R1 and found I cannot use Connect-VIServer at all. Nothing changed on host side. I have downgraded back to 6.0 R2 and it is working again.

I wish I could help you further, but I don't have time to diagnose this - I just need my automated scripts to run.

vSphere PowerCLI 6.0 - VMware Developer Center

0 Kudos
saikishor
Contributor
Contributor

I am also facing the same issue after installing VMware vSphere PowerCLI 6.3 Release 1 build 3737840. PowerCLI scripts were executing successfully when running on VMware vSphere PowerCLI 5.5 Release 1 build 1295336

Please let me know if there is any solution

0 Kudos
ZeCavalheri
Contributor
Contributor

Hello Guys,

I faced the same issue and hereby the solution:

connect-viserver : 3/5/2017 3:47:53 PM Connect-VIServer The underlying connection was closed: An unexpected error

occurred on a send.

At line:1 char:1

+ connect-viserver vcsa-01a -user administrator@vsphere.local -p ...

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

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

  + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_WebException,VMware.VimAutomation.ViCore.Cmdl

  ets.Commands.ConnectVIServer

I found this KB article: Enabling the TLSv1.1 and TLSv1.2 protocols for PowerCLI https://kb.vmware.com/kb/2137109 which solved my issue. I created a 32bit DWORD named “SchUseStrongCrypto” in the HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 key and set the value to 1. Even using the 64bit version of PowerCLI, this DWORD was all that I needed to resolve my issue.

0 Kudos