A PowerShell script that collects information about the VMs on VMWare.
You can edit the last lines to export the data in any form you need, by default it doest to GridView.
- Script is desinged to run from your workstation
- PowerCLI must be installed.
-
Open PowerShell ISE
-
Import VMWare Core module with VMWare prefix using this command
Import-Module VMware.VimAutomation.Core -Prefix "VMWare"
I use this technique to avoid colliding with Hyper-V cmdlets as they share the same names.
-
Connect to vSphere using this command,
Connect-VMWareVIServer -Server <vSphereServerName> -Credential (Get-Credential)
-
Open the script and run it.
-
Review the GridViews and export again to CSV if needed.