Apendix Example Reports

In this appendix, we provide some examples on how to produce reports with the help of PowerCLI.

Virtual Machines

Virtual machine (VM) information is retrieved using the Get-VM cmdlet. The cmdlet in its simplest form returns all VMs in your infrastructure:

Get-VM

Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
VM001                PoweredOn  1        1.000
VM002                PoweredOff 1        1.000
VM003                PoweredOn  2        2.000

You can specify a VM name via the -Name parameter to be more specific in your request. If you prefer, you can omit the -Name parameter name and use wildcards. By default, only the default properties defined in the types.ps1xml file, located in the PowerShell installation directory, are displayed. To view all properties, ...

Get VMware vSphere PowerCLI Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.