Quantcast
Viewing all articles
Browse latest Browse all 237662

Re: How to list VMs within a host, datastore inside the vCenter?

Never mind, I got it

 

Get-VMHost "HOSTNAME" | Get-VM | Select Name,@{N="OS";E={$_.Guest.OSFullName}},@{N="DNS";E={[string]::Join(',',($_.Guest.ExtensionData.Net[0].DnsConfig.IpAddress))}},@{N="Host";E={$_.Host.Name}},    @{N="Datastore";E={[string]::Join(',',(Get-View $_.DatastoreIdList | %{$_.Name}))}} |Export-Csv C:\scripts\VMware\ESXI05_VM_OS_report.csv -NoTypeInformation -UseCulture


Viewing all articles
Browse latest Browse all 237662

Trending Articles