POSTS
LoadVMs-FromFile
I was using the VMware VI Toolkit for Windows for a change and I needed to load VMs from a CSV and my typical stream oriented way of doing this was very inefficient over the WAN (or LAN really). There are many ways of making Get-VM operations faster, but for this change I decided to use the standard Get-VM cmdlet with an array of computer names instead of doing them one by one.
Below is the function I wrote to make this easier for repeated use. The csv should have the computer name under a “Name” column heading. All other columns are ignored.
Example file
Field1,Name,Field3,FieldN
"","testvm01","",""
"","testvm02","",""
|
|