VMware

ManagedObjectReference Made Easier | Main | Customizing Guest Cmdlets

July 20, 2010

Output type changes in PowerCLI 4.1

In PowerCLI 4.1 we changed the namespaces in which output types live. This was done to improve the internal structure and enable other VMware teams to write cmdlets for the products they develop.

While the types remain the same (save for new features), the namespaces have changed and this affects scripts which use full namespace paths, for example:

if ($myObject -isnot VMware.VimAutomation.Client20.VirtualMachineImpl)

If you have scripts which quote full namespace paths, you need to replace the old namespace with the new one. A full listing of the changes is available in this file: Download TypeMapping - PowerCLI 4.0.1 to 4.1

Here are few examples to give you an idea of what's in the file:

VMware.VimAutomation.Types.VirtualMachine -> VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine
VMware.VimAutomation.Types.VMHost -> VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost
VMware.VimAutomation.Client20.VirtualMachineImpl -> VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl
VMware.VimAutomation.Client20.VMHostImpl -> VMware.VimAutomation.ViCore.Impl.V1.Inventory.VMHostImpl

You can always check for incompatible types with a simple script:

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c328153ef0133f26b8930970b

Listed below are links to weblogs that reference Output type changes in PowerCLI 4.1:

Comments

LucD

I suppose we will have to live with it ;-)
Just one question, why the V1 in the typename ?
Is that for the same reason they have V1 in the path for PowerShell v2 ?

Andrey Anastasov

The "V1" is a sign of a versioning system we plan to implement. When we face a need to make a breaking change in the objects, we plan to mark the new version as V2. The important part - for some period of time we plan to keep the objects support both V1 and V2 interfaces so there's enough time for scripts to migrate to V2. Then in some release V1 would disappear.

We're starting at version 1 because we expect that breaking changes will be very rare and the object version doesn't need to change with each PowerCLI release.

Robert van den Nieuwendijk

I created a function to change a PowerCLI 4.0 script into PowerCLI 4.1 and posted it in http://communities.vmware.com/thread/277095.

Robert van den Nieuwendijk

The previous link should be: http://communities.vmware.com/thread/277095

Post a comment

If you have a TypeKey or TypePad account, please Sign In.

About this Blog

This blog provides insight and highlights for VMware PowerCLI, the best tool for automating management and configuration of VMware vSphere.

Subscribe via RSS  

Recommended Reading

Pimp your PowerCLI

Twitter


Facebook

    VMware Blogs