Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 49146

Re: vCenter Inventory

$
0
0

This combines the .txt file and your original code.
The text file assumes 1 VM name per line.

 

Get-VM-Name (Get-Content-Path vmnames.txt)|

Select @{N=”Datacenter”;E={(Get-Datacenter-VM $_).Name}},

   @{N="Cluster";E={(Get-Cluster-VM $_).Name}}, Name,

   @{N="VMUUID";E={$_.ExtensionData.config.uuid}}|

Export-CSV"C:\DC-$(Get-Date-f ddMMyyyy).csv"-NoTypeInformation


Viewing all articles
Browse latest Browse all 49146

Trending Articles



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