Home > Blogs > VMware PowerCLI Blog


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:

4 thoughts on “Output type changes in PowerCLI 4.1

  1. 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 ?

    Reply
  2. 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.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*