Greetings folks -
I've been playing around with powershell for VMware and am starting to get the hang of it. I was wondering if anyone had an example of powershell scripting that obtains the properties of the virtual machines. In particular, I was looking for things such as:
Disk break down and Size
Memory Assigned
MAC addresses
Many thanks
Hi,
Try $a = Get-VM "TSTVM"
or $b = Get-VM "TSTVM" | Get-View
Use $a | Format-List *
or $b | Format-List *
to dig through all available properties.
Thanks for that info - would you happen to have an example script of being able to get the MAC address in powershell?
Read the help for the Get-NetworkAdapter cmdlet and you'll see it's really easy.
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)