how many times you have been asked to do some task on your VMware environment and it take from you so much time to finish , what if there is a way to make your life much Easier and save your time with VMware PowerCLI you will be able to boost your productivity ,do bulk operation , Gather some data for reports , in personal it helped me a lot and save my time .
one of the great strengths of PowerCLI and PowerShell is that it was written for System Administrators, for the people who need to get the job done fast and move to the next thing .
What is VMware PowerCLI ?
VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell, and provides more than 600 cmdlets for managing and automating vSphere, vCloud, vRealize Operations Manager, and VMware Horizon environments.
Where do it get PowerCLI From ?
follow this Link
before you install you will need to have powerShell Version 5 or later and min is version 3 , it’s recommend to have the latest version of PowerCLI , .Net Framework 4.5.x or higher is required
PowerCLI 6.5.2 Online Installation
PowerCLI now based on Module so it’s easy to install it from inside powerShell
first we need to check PowerShell Version , run this command $PSVersionTable within PowerShell Session
if you have PSVersion 5.0 or higher so we can start direct to install PowerCLI
Install-Module -Name VMware.PowerCLI –Scope CurrentUser
– you will be aske to update ‘NuGet Provider’, choose ‘Y’ to install and import the newer version.
– you will be asked to ‘install modules from an untrusted repository’, choose ‘Y’ to accept.
now PowerCLI istalled succefully
If the PSVersion is a Value of 4.x or 3.x you will need to install PowerShell Current Version Windows Management Framework 5.1 after that follow the same steps as above .
now your are ready to start your first step on PowerCLI from powershell type the following command
Connect -VIServer “vCenter name or ESXI host ”
Using help on PowerCLI
from the console you can get the full help for each cmdlet and also examples on how you can use this cmdlet , To access the help and the examples for a cmdlet there are multiple ways, you can use user Gudie here , PowerCLI Reference here andVMware PowerCLI Reference Poster here ,secondly you can run the Get-Help cmdlet and also use the –examples parameter to gain more information, see below for an example:
Resuorce to help in learning PowercLI
- VMware PowerCLI Blog
- VMware GitHub
- Sajal Debnath have a recoreded session talking about basic of PowerShell and PowerCLI Basic of VMware PowerCLI
- VMworld 2016: INF8038 – Getting Started with PowerShell and PowerCLI for Your VMware Environment
- VMware HOL Online HOL-1721-SDC-6 – vSphere Automation with PowerCLI
- official VMware PowerCLI community
- Pluralsight have a giant section of PowerShell and PowerCLI based videos
- VMware vSphere PowerCLI Reference: Automating vSphere Administration 2nd Edition
just start learning PowerCLI and don’t be late you will lose to much if you miss this amazing tool , we will follow this post with more posts about VMware PowerCLI
PowerCLI 10th Birthday .. Happy birthday powerCLI