Using PowerShellPlus with PowerShell V2 (CTP3)

The great news is: PowerShellPlus works as-is with PowerShell V1 and PowerShell V2, indicating the stable and solid approach of its engine. No updates needed. From the very beginning, we took care to use only approved and backwards-compatible PowerShell APIs.

You don't use PowerShellPlus yet?  It is an awesome interactive console and PowerShell editor, and you should really try it! It is derived from famous "PowerShellIDE" which was the world's first PowerShell GUI, editor and debugger (surfaced June 2006). Yet again, it pays off to have solid 4 years of experience in this product.

There are a couple of things you should know when you just upgraded from V1 to V2 to get PSP to recognize the new V2 features.

Update the Cache

For speed purposes, PowerShellPlus caches information regarding available Snap-Ins and Cmdlets. So when you have been using PSP on PowerShell V1 for a while and upgrade to PowerShell V2 CTP3, things continue to work as expected except all new V2 specific Cmdlet parameters and help pages are still missing.

Normally, PSP detects at startup all freshly added Snapins and adds them to its cache. Upgrading PowerShell is a whole new ballgame though because actually no new snapins is added. Instead, existing snapins are updated.

To manually reset and update PSPs internal cache, do this:

  1. Launch PowerShell Plus
  2. Hold down SHIFT when the splash screen opens to open the startup management dialog
  3. Check the option "Clear cached Cmdlet info", then click OK
  4. PSP starts and re-examines all available snapins. This may take a minute or two, and you will see a green bar with progress information. Once the green bar is gone, you are all set.

Once you cleared and updated the cache, try this:

Get-WMIObject -

Code completion will show the complete list of V2 parameters.

Update the Learning Center

If you'd also like to update the learning center help pages, keep this in mind: the procedure you just executed automatically adds all new help topics to the learning center. It does not update existing topics though. So to update the learning center, simply delete its cache before you do the procedure above ("Yeah, thanks for telling me now! Just did it!" - oh well, ok, just do it again)!

How do I clear the learning center cache? For example like this:

del $env:localappdata\PowerShellPlus\manpages\*.htm -whatif

(Remove the -whatif if you are confident you typed in the correct line)

What's Next?

Of course there are plenty of additional extras in PowerShell V2 like block comments and inline code. We will support them with one of our next maintenance releases but for now, isn't it good to know that PowerShellPlus runs beautifully with PowerShell V2 CTP3?

Cheers

-Tobias


Posted Jan 04 2009, 10:54 PM by Tobias Weltner
Filed under: , ,

Comments

Dew Drop - January 6, 2009 | Alvin Ashcraft's Morning Dew wrote Dew Drop - January 6, 2009 | Alvin Ashcraft's Morning Dew
on 01-06-2009 8:29 AM

Pingback from  Dew Drop - January 6, 2009 | Alvin Ashcraft's Morning Dew

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.