# References * https://vdc-download.vmware.com/vmwb-repository/dcr-public/1addc72d-5822-40b9-bc10-8dde76a49c70/8401b705-742b-4192-8158-6b02a578cfa7/GUID-3034A439-E9D7-4743-ABC0-EE38610E15F8.html * https://www.reddit.com/r/PowerShell/comments/dsqh7h/vmware_powercli_on_server_without_internet/ * https://docs.vmware.com/en/VMware-PowerCLI/latest/powercli/GUID-3034A439-E9D7-4743-ABC0-EE38610E15F8.html # Install Powershell on Debian ``` ################################### # Prerequisites # Update the list of packages sudo apt-get update # Install pre-requisite packages. sudo apt-get install -y wget # Download the PowerShell package file wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/powershell_7.4.5-1.deb_amd64.deb ################################### # Install the PowerShell package sudo dpkg -i powershell_7.4.5-1.deb_amd64.deb # Resolve missing dependencies and finish the install (if necessary) sudo apt-get install -f # Delete the downloaded package file rm powershell_7.4.5-1.deb_amd64.deb # Start PowerShell pwsh ``` # Install from Powershell (requires internet connectivity) ``` install-module -name VMware.PowerCLI ``` # Download then transfer to offline machine ``` Find-Module VMware.PowerCLI |Save-Module -Path VMWare.PowerCLI.psm ```` * Copy file `VMWare.PowerCLI.psm` to offline machine ``` cp VMWare.PowerCLI.psm $env:PSModulePath ``` # Connect to vcenter ``` Connect-VIServer -server vcenter ```