Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active January 12, 2024 09:15
Show Gist options
  • Save gilangvperdana/fdf4d6ad5c83b8d50e925dae117a4f66 to your computer and use it in GitHub Desktop.
Save gilangvperdana/fdf4d6ad5c83b8d50e925dae117a4f66 to your computer and use it in GitHub Desktop.
PowerCLI VMWare Installation

General

PowerCLI for VMware

Installation (tested on Windows10)

## Install Online (Run Powershell as Administrator)
Install-Module VMware.PowerCLI -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
 
## Kalo tidak bisa online, Install Offline
- Download Paket dari https://developer.vmware.com/web/tool/vmware-powercli/
- Extract zip nya
- Buka powerCLI (Run As Administrator) terus exec command
cd \folderHasilExtractZIPtadi
$env:PSModulePath
Get-ChildItem -Path '\folderHasilExtractZIPtadi' -Recurse | Unblock-File
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
 
## kalo gabisa Set- Buka powerCLI (no Run As Administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
 
## Untuk Verif udah ke Install (buka Powershell no Run As Administrator)
Get-PowerCLIConfiguration
Connect-VIServer -server $IP_VCENTER
 
Contoh command utk list Host pake PowerCLI :
Get-VMHost | Out-GridView

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment