There is a common issue you might have faced while connecting to either vCenter server or Esxi Server using Vmware PowerCLI.
Connect-VIserver $esxiServer -User $user -Password $password
Connect-VIServer could not connect using the requested protocol.
Additional Information: The remote server returned an unexpected resource: (302) Found.
Solution: The provided server name or ip address is not reachable, Use the valid and reachable server/ip to connect.
Useful Articles
PowerCLI The SSL connection could not be established see inner exception
How to import default vCenter server appliance VMCA root certificate and refresh CA certificate on ESXi
How to replace default vCenter VMCA certificate with Microsoft CA signed certificate
Managing ESXi SSL certificate properties from vCenter server
Forward vCenter Server Appliance logs to syslog server
VMware vCenter Server 7 Profiles with PowerShell
Configure vCenter 7 Profile from PowerShell GUI