Closed rutgerblom closed 7 years ago
Even if the information is not available in the registry it should be registered with the environment making it available with get-module like so:
Get-Module -ListAvailable -Name VMware.VimAutomation.Core
And finding the path:
(get-item (Get-Module -ListAvailable -Name VMware.VimAutomation.Core).modulebase).parent.parent.fullname
Thank you for the bug-report and the proposed solution! I have changed the way of finding the init script based on @robert-i 's suggestion. Could you please try the script from the v1.5.2 branch if it works for you? I have tested it in my environment and it seems to be fine.
Looks good from here also
Fixed with version 1.5.2. Get the folder where PowerCLI is installed with $idir = (Get-Module -ListAvailable -Name VMware.VimAutomation.Core).ModuleBase
instead of reading the registry.
With PowerCLI 6.5 the installation path is not published in the Windows registry anymore. We need a new way to find the PowerCLI installation path.