PowerCLI

We can’t miss PowerCLI, of course. Those who are lovers of PowerShell will love PowerCLI or PowerNSX:

Welcome to VMware PowerCLI!
Log in to a vCenter Server or ESX host: Connect-VIServer
To find out what commands are available, type: Get-VICommand
To show searchable help for all PowerCLI commands: Get-PowerCLIHelp
Once you've connected, display all virtual machines: Get-VM
If you need more help, visit the PowerCLI community: Get-PowerCLICommunity
Copyright (C) VMware, Inc. All rights reserved.
PS C:>

Connect to vCenter Server with the Connect-VIServer command:

PS C:> Connect-VIServer 10.10.70.17
Name Port User
---- ---- ----
10.10.70.17 443 VSPHERE.LOCALAdministrator

You can easily get information about hosts with the command Get-VMHost command:

PS C:> Get-VMHost
Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz MemoryUsageGB MemoryTotalGB Version
---- --------------- ---------- ------ ----------- ----------- ------------- ------------- -------
esxi1.sipovecs... Connected PoweredOn 12 2782 28764 69,518 191,778 6.5.0
esxdell2.sipovecs... Connected PoweredOn 12 1604 28764 56,332 191,778 6.5.0
We already discussed in Chapter 5, Configuring and Managing vSphere 6.5 how to install and work with PowerCLI. Additional info can be found at https://blogs.vmware.com/PowerCLI/2017/04/powercli-install-process-powershell-gallery.html.

The last one is PowerNSX, that is, PowerCLI for NSX. You can use PowerNSX to install or configure or TRBL NSX. PowerNSX is great to use with the PowerOps tool. Only one book is available about PowerNSX and can be found at https://powernsx.github.io/.

I think that now your brain is full of CLI and commands. However, at this moment, it is not important to remember every CLI. We need to know and remember what it is possible to do and which CLI can be used for the different parts of the TRBL process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.140