{"id":7259,"date":"2020-09-09T22:35:40","date_gmt":"2020-09-09T20:35:40","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7259"},"modified":"2020-09-10T11:33:52","modified_gmt":"2020-09-10T09:33:52","slug":"vmware-installing-powercli-from-zip","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/vmware-installing-powercli-from-zip\/","title":{"rendered":"VMware: Installing PowerCli from zip"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7259 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7259')){$('.twoclick_social_bookmarks_post_7259').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"VMware%3A%20Installing%20PowerCli%20from%20zip\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Aif%20you%20have%20an%20system%20which%20is%20not%20connected%20to%20the%20internet%20you%20cannot%20install%20PowerCli%20online%20.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/vmware-installing-powercli-from-zip\\\/\",\"post_id\":7259,\"post_title_referrer_track\":\"VMware%3A+Installing+PowerCli+from+zip\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>if you have an system which is not connected to the internet you cannot install PowerCli <a href=\"https:\/\/michlstechblog.info\/blog\/vmware-installing-powercli\/\" rel=\"noopener noreferrer\" target=\"_blank\">online <\/a>.<\/p>\n<p><!--more--><\/p>\n<p>On the <a href=\"https:\/\/code.vmware.com\/web\/tool\/12.0.0\/vmware-powercli\" rel=\"noopener noreferrer\" target=\"_blank\">project page<\/a> there is also a zip file with all modules.<\/p>\n<p>Determine the module path. Use on of them:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:&gt; $ENV:PSModulePath.Split(&quot;;&quot;)\r\nC:\\Users\\zzzzz5d0\\Documents\\WindowsPowerShell\\Modules\r\nC:\\Program Files\\WindowsPowerShell\\Modules\r\nC:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\r\nC:\\Program Files (x86)\\Microsoft SQL Server\\110\\Tools\\PowerShell\\Modules\\\r\n<\/pre>\n<p>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<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; 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\r\nPS D:\\&gt; &amp; 'C:\\Program Files\\Tools\\7-Zip\\7z' x -o &quot;C:\\Program Files\\WindowsPowerShell\\Modules&quot; $ENV:temp\\powercli.zip\r\n<\/pre>\n<p><strong>Note:<\/strong> Don&#8217;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:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; connect-viserver\r\nconnect-viserver : The 'connect-viserver' command was found in the module 'VMware.VimAutomation.Core', but the module\r\ncould not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core'.\r\nAt line:1 char:1\r\n+ connect-viserver\r\n\r\nPS D:\\&gt; Import-Module VMware.VimAutomation.Core\r\nImport-Module : Could not load file or assembly 'file:\/\/\/C:\\Program\r\nFiles\\WindowsPowerShell\\Modules\\VMware.VimAutomation.Common\\net45\\ICSharpCode.SharpZipLib.dll' or one of its\r\ndependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)\r\n\r\n<\/pre>\n<p>When using 7-Zip all works as expected<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; Connect-VIServer\r\nWARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI a\r\n....\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hi, if you have an system which is not connected to the internet you cannot install PowerCli online .<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[344,7,4],"tags":[1485,1484,119,215,14],"class_list":["post-7259","post","type-post","status-publish","format-standard","hentry","category-powershell-scripting","category-vmware","category-windowsscripts","tag-error-icsharpcode-sharpziplib-dll-not-found","tag-from-zip","tag-install","tag-powercli","tag-vmware-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7259"}],"version-history":[{"count":3,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7259\/revisions"}],"predecessor-version":[{"id":7262,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7259\/revisions\/7262"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}