Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

Exporting information on all hosted VM's

$
0
0

So I've managed to get 75% of what I'm looking to extract from vCenter and export it to a CSV file. I'm trying to get some more information which will help me maintain the vCenter environment I am working on. I guess the first problem I'll address is what is the best way to pull down the IPv4 address only? Right now I'm getting both IPv4 and IPv6. When I log into the vCenter server via PowerCli and then run this command:

 

 

     Get-VM | Select Name, @{N="IP addr";E={[string]::Join(',',$_.Guest.IPAddress)}}, NumCpu, MemoryGB, Notes, PowerState | Export-Csv -path "c:\temp" -NoTypeInformation

 

I'm getting a CSV file with a number of data points, and it all looks good other than the IPv4 issue. I tried just adding Host or NetworkAdapters to the data points to get, but it didn't work. Am I going about this the wrong way, or is there a better way to get these data points?

 

 

Thanks!


Viewing all articles
Browse latest Browse all 16717

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>