Hi,
if you have an system which is not connected to the internet you cannot install PowerCli online .
On the project page there is also a zip file with all modules.
Determine the module path. Use on of them:
1 2 3 4 5 | PS D:> $ENV:PSModulePath .Split( ";" ) C:\Users\zzzzz5d0\Documents\WindowsPowerShell\Modules C:\Program Files\WindowsPowerShell\Modules C:\Windows\system32\WindowsPowerShell\v1.0\Modules C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\ |
Download the latest release and open the zip file with 7-Zip, close all Powershell Windows and extract all folders to one of the Powershell modules directory determine above. From command line
1 2 | PS D:\> Invoke-WebRequest https://vdc-download.vmware.com/vmwb-repository/dcr-public/2802fdb1-bca3-4875-b76f-901cb15c2b2a/509b4a98-5ee5-4048-9407-28b9f85ba65c/VMware-PowerCLI-12.0.0-15947286.zip -Outfile $ENV:TEMP \powercli.zip PS D:\> & 'C:\Program Files\Tools\7-Zip\7z' x -o "C:\Program Files\WindowsPowerShell\Modules" $ENV:temp \powercli.zip |
Note: Don’t use the explorer for unzipping because it does not correctly extract all files. You may get an error like this when trying to use Powercli:
1 2 3 4 5 6 7 8 9 10 | PS D:\> connect-viserver connect-viserver : The 'connect-viserver' command was found in the module 'VMware.VimAutomation.Core' , but the module could not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core' . At line:1 char:1 + connect-viserver PS D:\> Import-Module VMware.VimAutomation.Core Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Common\net45\ICSharpCode.SharpZipLib.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) |
When using 7-Zip all works as expected
1 2 3 | PS D:\> Connect-VIServer WARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI a .... |
your post helped me!
Thanks a lot! I was having trouble with New-HVPool failing on version 12.1, but installed version 12 from a ZIP with your help, and it worked great. Thanks a lot!