powerCli (powershell):
PS C:> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout
—– ———– ——————- ———————— ————————– ——————-
Session UseSystemProxy Multiple Ignore True 300
User Multiple Ignore
AllUsers
PS C:> Connect-VIServer -Server 10.10.10.10 -Protocol https -Username ‚Domain\user‘ -Password ‚password‘
Name Port User
—- —- —-
10.10.10.10 443 Domain\user
PS C:> Get-View -Viewtype VirtualMachine -Property Name, Config.Hardware.Device | `
Select name,
@{n="MAC(s)"; e={($_.Config.Hardware.Device | ?{($_ -is [VMware.Vim.VirtualEthernetCard])} | %{$_.MacAddress}) -join ","}} | `
Export-Csv c:\temp\VM_MAC.csv -UseCulture -NoTypeInformation
PS C:> dir c:\temp
Directory: C:\temp
Mode LastWriteTime Length Name
—- ————- —— —-
-a—- 20.01.2023 12:40 1495 VM_MAC.csv