Hello,
I am trying to install PowerCLI using the following commands
Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force
This one returns a Warning:
WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.
I have removed and the module and installed it again, tried to proceed with the next step:
Install-Module -Name VMware.PowerCLI -SkipPublisherCheck -Force -AllowClobber
But getting this error:
PackageManagement\Install-Package : Package 'VMware.Vim' failed to be installed because: The process cannot access the file 'C:\Users\gmohammed\AppData\Local\Temp\xs5ns0ff\netcoreapp2.0\VMware.Vim.dll' because it is being used by another process. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9710 char:34 + ... talledPackages = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (VMware.Vim:String) [Install-Package], Exception
+ FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
I spent quite some time searching\Googling to get a solution but no luck.
I appreciate any help, thanks!
Can you try using a PowerShell session started as Administrator?
Then try to upgrade the module with
Update-Module -Name PowerShellGet -RequiredVersion 2.2.5
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you try the solution from Solved: Re: Unable to Install PowerCLI - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The solution from that thread I pointed to was that the user had Visual Studio installed.
After removing that, the module installed
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No Visual Studio installed, nothing in program files or program data and not in control panel.
Regards,
Strange.
Did you try on another station?
Same result?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have tried it on my laptop and it works fine so I ended up doing an offline installation and that worked, thanks for your help tho!