Quick Hit – PowerCLI as a Module and Loading it up

PowerCLI is a great tool, has been since about day one of Powershell. As Powershell has progressed and PSSnapins where replaced with Modules, PowerCLI took a long time to make the jump to modules. While stiff functional it was a point of question. So with version 6 it is mostly modules which is great, however now I have to tweak my Powershell profiles. Much like other customized shells (Operations Manager, SharePoint, etc …), I hate the single purpose shells so I had to customize my profiles. So what I have put together is real simple, and gets me started loading it up:

(get-module -Name vm* -ListAvailable).Foreach{Import-Module $_.Name}


Where is it…

So I have been really liking the new Script Browser (http://blogs.technet.com/b/onescript/archive/2014/05/11/what-s-new-in-script-browser-amp-script-analyzer-1-2.aspx) add-on for ISE. Surprisingly I am liking it for the Script Analyzer. Surprising? To be honest I have not been a fan of the recent Scripting Games and all of the judges’ feedback regarding aliases and other commonly used practices. I do see the point but for me, I write the script, make it work and then if I have to make it public I will go through and comment the code to a sickening level. I love what Mr. James Brundage (http://www.start-automating.com/) has brought to the Powershell community but Script Cop angered me 🙂

Since I spend time trying to bestow the strengths of Powershell amongst my colleagues, I am starting to use Script Analyzer to clean up my code before sharing.

The support with the “add-on” has been great as well. With version 1.1 I had encountered some “features” and submitted an email inquiring. The response was quick and a great help.

Since Powershell V3 I have been using the ISE exclusively as my editor and this set of add-ons just makes that experience better.

So what am I posting about? I had the feature installed and working and using the toolset. Then I rebuilt my machine (Bare Metal) to Win7 x64 and of course tried to reinstall the product. Hint, we use roaming profiles. I could net get the install to work, always getting to a point where it wanted a path to a setup.msi file. I tried a few things and was about to send an email to see where I should look in the registry. I wish there was a better code display plugin for wordpress but the details of where I found it…

HKEY_USERS and within my hive it was withing Software\Microsoft\Installer\Products

Once I removed the key from Products, I was able to cleanly install Script Browser.


So, this post is more about personal loyalties than Powershell itself.  The recent changes with PowerGUI have me contemplating changing my default editor.  I have found PowerGUI to be great, but part of the greatness was the Product Manager.   The product is great, especially the editor.  I did buy the pro version and quite frankly in my environment it didn’t give me anything I could use but it seemed right to support the product as I as endorsing it to everyone I worked with.

At this point I am considering going back to PowershellPlus but after I played with the most recent beta I miss the original version.  I still use Sapien for when I have to work with vbscript code but I find it way too bloated when comparing it PowerGUI.  When it’s all said and done I think I will be deciding between the ISE and the free PowerGUI.


Just thought I would post a quick note on my experience with the Powershell ISE.  In the past I have stated my preference for Powershell Plus as my Powershell script editor.  I am still a huge fan (well other than the new version seems to have an issue) of the product and in truth it is much more than a script editor. 

I also enjoy the PowerGUI editor but in general I do not use the PowerGUI suite, but when working on a script on a machine that isn’t my workstation, it was easy to install PowerGUI and have access to a decent editor.

With Powershell V2, the ISE was introduced.  I had used it briefly when giving an internal demonstration of Powershell to my colleagues.  I also must admit that I tried to customize it using the ISE specific profile but failed miserably and had given up on it.

A recent project had me developing a script on a server and considering latency it was just easier to RDP into the server and interact with the console.  With the ISE, I had access to an editor and a powershell command line interface without installing PowerGUI or any other software.  I am very impressed with the ISE for developing and debugging scripts.

That said, I still think Powershell Plus is a great tool set.  Any script editor that includes syntax highlighting is helpful and there are some other niceties such as automatically certificate signing scripts, snippets and code completion.  Where I still use Powershell Plus the most is the actual shell.  Whether working on a script or just simple day to day sell usage, I have found Iuse get-help much less since within the shell I can type a cmdlet or function and it knows about most if not all the parameters and includes links to help documents or searches.

Okay I have to get back to completing this script.


Technorati Tags: ,,,