Home > Blogs > VMware PowerCLI Blog

Thoughts around PowerCLI and the Powershell Gallery

I am *very* excited to share some thoughts and possibilities for PowerCLI.

Packaging and Installation are big areas we have been looking at. We have heard loud and clear that our customers wanted to embrace modules and in our recent releases we have moved away from snapins into modules. We’re now looking at how we package the modules and deliver them to our users.

One possibility would be releasing PowerCLI exclusively from the Powershell Gallery, the central repository for Powershell modules. The benefits of this would be great, as it provides easy installation and upgrade, follows Powershell patterns for modules, and most importantly would allow us to deliver PowerCLI to multiple platforms, such as Linux and MacOS.

Here is an idea of what we are currently thinking:

  1. You would need to make sure you have the latest Powershell. WMF 5.1 is required for the PowershellGet cmdlets, which includes install-module. (You may want to do this now!)
  2. Make sure $env:PSModulePath includes C:\Program Files\WindowsPowerShell\Modules . This is only precautionary because it should already be set, but you should check anyway.
  3. Prior to installation of the PowerCLI from the Microsoft Gallery you would need to uninstall any previous version of PowerCLI that was installed by MSI.
  4. You would no longer have PowerCLI shortcuts on your desktop. PowerCLI would be immediately available when you run powershell, no Import-Module required. If you really miss the icon, find me at a conference and I’ll give you a sticker! 🙂
  5. Installation of PowerCLI on machines that cannot access the Powershell Gallery can be done by saving the module to a thumb drive or network share accessible to the installation target and dropping the files in the module folder of the destination computer or using Install-Module with a path to the downloaded file.
  6. We are thinking about using Update-Module in the future to make geting the latest bits faster and easier!

I understand that change can be hard, so I’m giving you the opportunity to tell us why (or why not) a Powershell Gallery installation/update would not work for you.

Regarding the results from the survey we recently held, an extremely high percentage of the respondents prefer the Gallery installation for ease of installation and updates. Still, there were a few respondents that had some concerns that I want to address here.

  1. “The Powershell Gallery is not as secure as downloading an MSI from vmware.com” – This is not true. We digitally sign all PowerCLI files as we always have, guaranteeing authenticity. PowershellGet has built-in verification of the digital signature, and will not install unsigned modules unless you explicitly skip the publisher check.
  2. “This makes offline installation/upgrades much harder” – So far, I’ve identified two different methods of offline installation and both require less steps (and ZERO mouse clicks). Method one uses Save-Module to copy to a network drive accessible by the ‘offline’ machine. You could also save to a USB drive or any other storage location that your installation target can access. Method two uses Invoke-WebRequest to download the package and can again be saved to a location of your choosing. Either of these options are still far easier than the current process.

Conclusion

In my prior life as a customer, I could only dream of installation and upgrades being this easy. By releasing to the gallery, it would not only make *that* dream come true, but would also give us the ability to accelerate our releases to get improvements out for you to enjoy much sooner.

Added to this we would be bringing PowerCLI back in line with the PowerShell patterns and ensuring future powershell enhancements made around modules and module tooling could easily be consumed with PowerCLI.

I hope you join with me in the excitement of the amazing opportunities we have with PowerCLI!

What are you excited or concerned about with a Powershell Gallery release? Let us know in the comments here!

 



Thoughts around PowerCLI and the Powershell Gallery

I am *very* excited to share some thoughts and possibilities for PowerCLI.

Packaging and Installation are big areas we have been looking at. We have heard loud and clear that our customers wanted to embrace modules and in our recent releases we have moved away from snapins into modules. We’re now looking at how we package the modules and deliver them to our users.

One possibility would be releasing PowerCLI exclusively from the Powershell Gallery, the central repository for Powershell modules. The benefits of this would be great, as it provides easy installation and upgrade, follows Powershell patterns for modules, and most importantly would allow us to deliver PowerCLI to multiple platforms, such as Linux and MacOS.

Here is an idea of what we are currently thinking:

  1. You would need to make sure you have the latest Powershell. WMF 5.1 is required for the PowershellGet cmdlets, which includes install-module. (You may want to do this now!)
  2. Make sure $env:PSModulePath includes C:\Program Files\WindowsPowerShell\Modules . This is only precautionary because it should already be set, but you should check anyway.
  3. Prior to installation of the PowerCLI from the Microsoft Gallery you would need to uninstall any previous version of PowerCLI that was installed by MSI.
  4. You would no longer have PowerCLI shortcuts on your desktop. PowerCLI would be immediately available when you run powershell, no Import-Module required. If you really miss the icon, find me at a conference and I’ll give you a sticker! 🙂
  5. Installation of PowerCLI on machines that cannot access the Powershell Gallery can be done by saving the module to a thumb drive or network share accessible to the installation target and dropping the files in the module folder of the destination computer or using Install-Module with a path to the downloaded file.
  6. We are thinking about using Update-Module in the future to make geting the latest bits faster and easier!

I understand that change can be hard, so I’m giving you the opportunity to tell us why (or why not) a Powershell Gallery installation/update would not work for you.

Regarding the results from the survey we recently held, an extremely high percentage of the respondents prefer the Gallery installation for ease of installation and updates. Still, there were a few respondents that had some concerns that I want to address here.

  1. “The Powershell Gallery is not as secure as downloading an MSI from vmware.com” – This is not true. We digitally sign all PowerCLI files as we always have, guaranteeing authenticity. PowershellGet has built-in verification of the digital signature, and will not install unsigned modules unless you explicitly skip the publisher check.
  2. “This makes offline installation/upgrades much harder” – So far, I’ve identified two different methods of offline installation and both require less steps (and ZERO mouse clicks). Method one uses Save-Module to copy to a network drive accessible by the ‘offline’ machine. You could also save to a USB drive or any other storage location that your installation target can access. Method two uses Invoke-WebRequest to download the package and can again be saved to a location of your choosing. Either of these options are still far easier than the current process.

Conclusion

In my prior life as a customer, I could only dream of installation and upgrades being this easy. By releasing to the gallery, it would not only make *that* dream come true, but would also give us the ability to accelerate our releases to get improvements out for you to enjoy much sooner.

Added to this we would be bringing PowerCLI back in line with the PowerShell patterns and ensuring future powershell enhancements made around modules and module tooling could easily be consumed with PowerCLI.

I hope you join with me in the excitement of the amazing opportunities we have with PowerCLI!

What are you excited or concerned about with a Powershell Gallery release? Let us know in the comments here!

 

23 thoughts on “Thoughts around PowerCLI and the Powershell Gallery

  1. Fred

    Hi Jake,

    absolutely looking forward to that move.

    When you change the way this works, would you mind improving the compatiblity of PowerCLI with the rest of the PowerShell ecosystem?
    – The current module changes a lot of the user’s environment (prompt and tabexpansion).
    – When importing PowerCLI, lots of child-modules get loaded that are completely superfluous. All of that content could be part of the main module.
    – The manifests declare “*” as the exported functions/cmdlets. Explicitly list all cmdlets and functions instead to have less impact on performance.
    – You ship a lot of customized Get-PrefixCommand functions that give no extra value over Get-Command.

    Cheers,
    Fred

    Reply
      1. Fred

        I’ve got your previous version customized doing much of that already. If you’ve got me a place to dump the current version, I can send you the changes:
        – Dropped the prompt change
        – Did most of the consolidation
        – Fixed the manifests

        Reply
        1. Jake Robinson Post author

          Okay Fred, Now that we’ve released 6.5.1, I’m looking forward to see if we missed anything in your list. 🙂 My email is jaker at vmware

          Reply
  2. Joey Piccola

    I’d prefer the gallery approach. You’ would gain some CI around your releases, win win for everyone.

    Reply
  3. Alex Monroe

    I also prefer the PowerShell gallery approach. Still, I wish yah’ll would do something about the cmdlet naming overlap with Hyper-V cmdlets.

    Reply
  4. Judd

    While I like the Microsoft Gallery approach in general you might have problems in certain market segments such as DoD where there are strict requirements of getting software from secure, trusted and verify sources. I don’t know if the Microsoft Gallery would be able to be used in those situations.

    Reply
    1. Jake Robinson Post author

      Hi Judd, Microsoft is working closely with DoD type segments to get the gallery verified. Microsoft is fully invested in distributing powershell modules using the gallery.

      Reply
  5. Magnus Ullberg

    While I like the idea of simplifying the installation I would like a way to download it straight from VMware as well.

    The proxy servers at work won’t allow me to download things from the Microsoft Gallery so I would have to download it off the network and send the files to myself which would be tedious.

    Thanks!

    Reply
  6. Tacos Are Tasty

    My concern would be the requirement to have WMF 5.1 installed. Unfortunately at work we have WMF 3.0 installed which prevents 5.1 from being installed.

    Reply
      1. Tacos Are Tasty

        I work in a large corporation and do not control what Microsoft updates are installed on my workstation.

        Most of your customers are ENTERPRISE users, not home bloggers. In the Enterprise world there are things like Proxy servers, Firewalls, and standard desktop/VDI images to worry about.

        Reply
        1. Jake Robinson Post author

          Hey Tacos, I’m sorry you’re not enjoying the new packaging and distribution method. I’ll share my perspective and dig in with some more questions to help me understand your situation.

          Firstly, on ‘home bloggers’: Careful… most of them are enterprise customers and partners with the same constraints in their own organizations.

          Is it the fact that the gallery is not a microsoft.com or vmware.com domain? If so, does your organization not have a procedure for whitelisting sites or repositories?

          Some enterprise customers who utilize Powershell as an organizational strategy are opting for their own private gallery. This allows them to distribute approved public modules across their workstations, and also distribute their own scripts and modules in a secure, consistent manner.

          Can you share your perspective on why the Microsoft Powershell Gallery is NOT ENTERPRISE? I hate for any user to have a bad time, and I want to do what I can to help you be efficient and automate the world.

          Here’s my perspective on why releasing to the Microsoft Powershell Gallery is MORE ENTERPRISE than an MSI:

          1. The Gallery will allow us to have a single installation method across all platforms (Win, Linux, MacOS).
          2. The Gallery allows us to release individual modules. This means we don’t have to do a full MSI package for a single module update.
          3. Smaller, more frequest releases means more developer focus on features and less on packaging and release problems.
          4. Simplified releases to the Gallery means less of a release bottleneck, and gets you PowerCLI awesomeness faster.
          5. The update-module cmdlet means you get the latest features and value in a single command.
          6. Finally, Microsoft is investing an epic amount of money to make this the de-facto standard for distributing Powershell modules. NuGet and PowershellGet are shipping standard with WMF 5.x, and I heard that PowershellGet is supported back to WMF 3.x.

          Thanks for your feedback. Please know that I am listening to all feedback that comes my way, and everyone is heard!

          Jake

          Reply
        2. Jake Robinson Post author

          Also, in regards to Proxies, I just confirmed on my own machine that Register-PSRepository, Install-Module, and Update-Module all have -proxy and -proxyCredential, allowing you to install modules through an enterprise proxy!

          Reply
  7. snehalat

    Thanks for sharing the details. The proxy servers at work won’t allow me to download things from the Microsoft Gallery so I would have to download it off the network and send the files to myself which would be tedious

    Reply
    1. Jake Robinson Post author

      Is it because you require a proxy, or that powershellgallery.com is not whitelisted? (there are -proxy arguments for cmdlets like Install-Module). Additionally, if your organization uses powershell as a strategic advantage, running your own private gallery locally is a great option.

      Reply
  8. Pingback: PowerCLI in the PowerShell Gallery - how to and why? | Virtualizatio'n'automation

  9. Robert Sweetman

    This would be totally awesome.

    I already created a custom module for our team to short-circuit waiting for the vSphere GUI to load which can help them find, turn on and connect to test servers.

    Would really benefit others if this sort of thing was available via PowerShellGet rather than after installing more things

    Reply

Leave a Reply

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

*