PowerCLI for VMware
## 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