VMware Cloud Community
julianwood
Enthusiast
Enthusiast

Adding .VMX Files to vCenter Inventory with PowerCLI gets even easier

There's a slightly easier way now to add VMs to the vCenter inventory if you have the .VMX file location.

The New-VM cmdlet now has a new parameter -VMFilePath which allows you to specify a path to the virtual machine you want to register.

This is in the format: [mydatastore] SERVER01/SERVER01.vmx

Have a look at my blog post for more info:

http://www.wooditwork.com/2011/08/11/adding-vmx-files-to-vcenter-inventory-with-powercli-gets-even-e...

http://WoodITWork.com
0 Kudos
3 Replies
LucD
Leadership
Leadership

Inspired by your script I created a pure PowerCLI function.

Have a look at VMX Raiders Revisited

This version will also check if there are .vmx files that are already registered.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
julianwood
Enthusiast
Enthusiast

What a fantastic addition!

http://WoodITWork.com
0 Kudos
mattboren
Expert
Expert

Good job publicizing the parameter -VMFilePath, JulianWood.  Hopefully it comes in handy for people.

Not to detract, but, for the record, it has been around for a while.  We have used it in some other threads (http://communities.vmware.com/message/1737466#1737466 for example).

In trying to pinpoint when it was introduced, I did not find a definitive "Release Notes" entry.  But, the first reference that I did find with that parameter available was in the PowerCLI 4.0U1 release (http://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/New-VM.html).

Anyway, that is just some historical info to add, nothing to do with the usefulness that you pointed out.

0 Kudos