I was about to execute couple of PowerCLI scripts and I encountered some strange issue while trying to connect to my vCenter server. I was using PowerCLI 6.5.1 which releases as a PowerShell module and I stopped using the old installed PowerCLI prompt.
There were no changes to the computer which I was using and suddenly it stopped the functionality and was throwing this error message when connecting to the vCenter using Connect-VIServer command. Here is the error message:
Connect-VIServer : Could not load file or assembly ‘VMware.VimAutomation.Logging.SoapInterceptor, Version=18.104.22.1686, Culture=neutral, PublicKeyToken=null’ or of its dependencies. The system cannot find the file specified. At line:1 char:1
I searched the reason behind this and I was able to find that one of my colleague has installed the old version of PowerCLI command prompt in the same computer.
I uninstalled the older version, closed the PowerShell window and tried to connect again. Fantastic! It was connected.
Actually, this was not quite a troubleshooting but spent some time before I started the actual planned work. So I hope this will help someone to get things done easily without wasting time.