Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 178040

Get memory for virtual machines in order of imported csv

$
0
0

I recently exported the names of all of our virtual machines, then organized over 400 of them in different groups. I neglected to also export the memory so I'm trying to import an csv get the memory and export that to a csv. That way I can just copy and paste the memory from one spreadsheet to another. I think I'm missing something simple but I can't see it I am trying this

 

$servers=Import-Csv C:\Users\sjesse\Desktop\sdcvms.csv

$vms=@()

foreach ($server in $servers)

{

 

    $vm=Get-VM -Name $server.Name select Name, Description, PowerState, NumCpu, MemoryGB

    $vms+=$vm

}

 

$vms | Export-Csv "C:\vms.csv" –NoTypeInformation

 

and I keep geting this error

 

VM with name '<name of the server>' was not found using the specified filter(s).

 

The name in the error is the exact name I see in vcenter, and was an exported by using get-vm to get all of the virtual machine names using this.

 

Get-VM | select Name | Export-Csv -path “c:\vminventory.csv” –NoTypeInformation

 

so I can't see why I can't find the VMs.


Viewing all articles
Browse latest Browse all 178040


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