Unable to install powercli 12.1 on windows 2016 server :
Powershell version on the server :
> $psversiontable
Name Value
---- -----
PSVersion 5.1.14393.3866
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3866
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Error :
Import-Module : Unable to find type [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory].
At line:1 char:33
+ Get-Module -ListAvailable vm* | Import-Module
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (VMware.VimAutom...eServiceFactory:TypeName) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
How did you install PowerCLI 12.1?
With Install-Module or Update-Module?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
using powercli zip file. no permission to use Install-Module or Update-Module
Did you remove all previous versions of PowerCLI before doing that?
Where did you unload the ZIP file?
Is that folder in your $env:PSModulePath?
What does Get-Module -Name VMware* -ListAvailable show?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes . I have removed all the older of powrcli from the server ..
Initially I extracted it to powershell module folder under system32
then I changed it to sys64wow for testing purpose .. I am getting same error.
When I am importing the modules, I’m getting the same assembly error ..
Hi @Nmanohar88,
The cleanup might has left some files on the system. Check the advice of @LucD .
To check the module install in a temporary user folder unzip the PowerCLI .zip in directory c:\users\public\VMware-PowerCLI-12.1.0-17009493. The helper script attached imports submodule by submodule. To cleanup simply delete the directory.
Hope this helps. Daniel
Hello Daniel and LucD,
Thank you so much for your assistance on this. Much appreciated.
Issue is fixed now. 🙂 🙂