Apr 02

Avoid PowerCLI Startup failures with this simple script

I blogged about this on the VMware PowerCLI blog but I figured it was important enough that I’d spread it around a little as well. With PowerCLI 6.0 R1 moving to PowerShell Modules rather than PSSnapins, users may find themselves needing to make some logic statements in all of their scripts to accommodate. The easiest way to do this, however, is to try to load the new module, and if the module is not loaded, to load the PowerCLI initialization script:

Screenshot 2015-04-01 12.54.51

Essentially what this does is start the PowerCLI scripts (adding all the necessary components) within the PowerShell console.

Problem solved!


Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

2 × three =