Closed Sader82 closed 6 years ago
I installed vmware module wit NuGet and it turnsout that VMware.Vim.dll is put in a subdirectory net45. your code:
$strVMwareVimDllDirectory = if ($oModuleInfo.Version -ge $verPowerCLIWhereDllMoved) {$oModuleInfo.ModuleBase} else {(Get-Item (Get-Module VMware.VimAutomation.Core).ModuleBase).Parent.Parent.FullName}
$pcliDll = Join-Path -Path $strVMwareVimDllDirectory -ChildPath "VMware.Vim.dll"
your code does not check for the net45 or netcoreapp2.0 folder.
Same issue when using PowerCLI 10 -- the named .dll is elsewhere. Need to fix
I installed vmware module wit NuGet and it turnsout that VMware.Vim.dll is put in a subdirectory net45. your code:
$strVMwareVimDllDirectory = if ($oModuleInfo.Version -ge $verPowerCLIWhereDllMoved) {$oModuleInfo.ModuleBase} else {(Get-Item (Get-Module VMware.VimAutomation.Core).ModuleBase).Parent.Parent.FullName}
$pcliDll = Join-Path -Path $strVMwareVimDllDirectory -ChildPath "VMware.Vim.dll"
your code does not check for the net45 or netcoreapp2.0 folder.