UPDATE 10-JAN-11: To deal with the issues identified below, I published a beta version of the VMware vSphere PowerPack with PowerCLI 4.1 or later support. You can read more about the beta and how to install it here.
Earlier this week, VMware released version 4.1 of the PowerCLI. This release brings some great improvements that the community has been waiting for, and you can read about them on the VMware PowerCLI site and a number of other blogs that have been publicizing the release. I’m not here to talk about the new features and improvements however. I’m writing this to notify you about the breaking changes that were introduced in this release that haven’t been discussed externally but that you will want to know about.
With version 4.1 of the PowerCLI, the VMware team has changed the namespaces used in the object model behind the PowerCLI. The objects themselves have stayed the same, but the namespaces have changed. This change has a number of impacts once PowerCLI 4.1 is installed, including but not limited to the following:
- Any PowerShell function that uses strongly typed parameter names with the VMware PowerCLI 4.0 or earlier type names will no longer function properly without an update.
- Any PowerShell script that uses the is or as operators with the VMware PowerCLI 4.0 or earlier type names type names will no longer function properly without an update.
- Any PowerGUI extensions (read: PowerPacks) written for PowerCLI 4.0 or earlier will no longer function properly without an update.
- Any PowerShell scripts that use the VMware PowerCLI 4.0 or earlier type names inside of Add-Type calls will no longer function properly.
In general, any code or script written that is dependent on these type names will have issues once you upgrade to PowerCLI 4.1. It also means that once these items that don’t work with 4.1 are updated, they may no longer work with PowerCLI 4.0 and earlier. Also note that these are just PowerShell-related impacts. If you’re using other languages to manage or automate VMware you need to be aware of the impacts for those languages as well. Here are a few PowerShell-specific examples of the impact of these breaking changes:
- The PowerCLI Community Extensions won’t work with PowerCLI 4.1 until they have been updated, and once they have been updated they will not work with PowerCLI 4.0 and earlier as long as they continue to use strongly typed parameter names (which they should).
- Scripts on PoshCode like this one and this one will suffer the same fate since they use strongly typed parameters in the advanced functions.
- Blog posts like this one from Glenn Sizemore and this one by Maish Saidel-Keesing will only work with PowerCLI 4.0 and earlier unless they are updated.
- The VMware Infrastructure PowerPack for PowerGUI and the Virtualization EcoShell will return data from the nodes, however actions will not appear and icons and charts will not show up in the grid.
- The VMware Community PowerPack for PowerGUI and the Virtualization EcoShell will return data from the nodes, however actions will not appear and icons and charts will not show up in the grid.
- Any blog posts that mentions PowerCLI object types will now be out of date.
- Books like this one will contain examples that are now broken.
As you can see, the PowerCLI 4.1 release comes with changes that are pretty far reaching, and they are definitely going to cause confusion in the community. Unfortunately, since these changes are now in the wild, we’re at a fork in the road where some community contributions will only support 4.0 and earlier for a while and others, as they start supporting 4.1 and later, may only support 4.1 and later depending on how they add that support. Changes like this are never fun, so please be aware of these changes when considering when to upgrade PowerCLI in your environment. As far as the PowerPack issues go, we will add support for the PowerCLI 4.1 release to the VMware Infrastructure PowerPack soon, but it will take a little while for us to work out the details and do the appropriate testing. Until then, please don’t upgrade the PowerCLI on your systems where you use the VMware Infrastructure PowerPack. Thanks, Kirk out.
12 thoughts on “PowerCLI 4.1: A fork in the road”
I am surprised that this has not made a bigger noise..
This is not a good thing – to put it mildly…
I’m surprised as well. Fortunately there are discussions going on with the VMware PowerCLI developer team about this issue right now to help them figure out what to do about it, but it may take some time to work out the details.
[…] that the VMware PowerCLI 4.1 is not supported with this release at this time, due to a number of issues. For now the only supported version of the VMware PowerCLI is version 4.0 […]
[…] as we elaborate on the impact of this change to your scripts. You can also read more about this on Poshoholic and the VI PowerShell blog. Possibly related posts: (automatically generated)New RadioTFS episode […]
So what’s the state of PowerCLI 4.1.x support?
Last night PowerGUI 2.3 went GA, and that release has a hard requirement for PowerCLI 4.0 U1 built in to the installer. We added this requirement due to the incompatibility described here. It seems that earlier this month, between our RTM and our GA dates, VMware released PowerCLI 4.1 U1 with backward compatibility support, so that version *should* work with our VMware PowerPack. We have not tested this yet however, but it should work. Unfortunately to use them together you have to first install PowerGUI with PowerCLI 4.0 U1 and the VMware PowerPack, then uninstall PowerCLI 4.0 U1 and then install PowerCLI 4.1 U1. That should allow you to use it with the latest version of the PowerCLI. Note again that I have not had time to test this scenario myself, but I will make time to try it soon.
We also have an update planned for the VMware PowerPack to move to the new object model so that we can support PowerCLI 4.1 and later releases, but that work has not happened yet. It isn’t far off though.
I hope this helps and let me know if you have any other questions. If you don’t want to wait for us to test with PowerCLI 4.1 U1 and you want to try it with that release yourself, I’d love to hear about your experiences with it.
Thanks for the info, Posh! 🙂
FYI, I have dug into this some more and unfortunately it is not as simple as it seems because 4.1.1 still doesn’t have the type names from 4.0 U1 properly included in the object model in all cases, and now there will be many warnings that appear when you get data from VMware using the PowerCLI cmdlets about properties that will be deprecated in the future. These warnings are a concern, and myself and other MVPs and vExperts are voicing those concerns with VMware to make sure they are aware of the problems.
Also, if you want to understand some more of the challenges with upgrading to PowerCLI 4.1.1, read this blog post: https://poshoholic.com/2010/12/17/a-letter-of-apology-to-the-vmware-powerpack-community/
[…] changed the object model that they were using in earlier releases. This change came with many undesirable and unwelcome side effects, effectively breaking backwards compatibility with many scripts that are built on top of the […]
[…] in July 2010 I shared my concerns about upgrading to version 4.1 of the PowerCLI due to a number of breaking changes introduced in that release. These changes […]
[…] across an apology by one of the PowerGUI guys. Essentially, he was apologizing for something that VMware changed in the functionality of PowerCLI that affects how the PowerGUI Virtualization Powerpack interacts […]
FYI, I just published a beta version with PowerCLI 4.1 U1 (and 4.1) support). See the message at the top of the blog post for more details.