Browsing the archives for the powershell community extensions tag.


PowerShell Community Extensions for PowerShell 2 CTP 3

Software, Uncategorized

PowerShell Community Extensions:

is aimed at providing a widely useful set of additional cmdlets, providers, aliases, filters, functions and scripts for Windows PowerShell that members of the community have expressed interest in.

Short answer: you want this, if you’re a PowerShell user. However, there are some initial gotchas that may cause you problems. I’m running Windows Vista Ultimate 32-bit, and had to do a bit of tweaking to get the install working properly. Here are the notes from my session:

First, go to the PSCX website to get the latest download (version 1.1.1 at the time of this writing).

Next, run the following script one time in the ISE:

$path = "$((get-pssnapin -r pscx).applicationbase)\typedata\filesystem.ps1xml"
$config = [xml](gc $path)
$config.Types.removechild($config.Types.Type[1])
$config.get_outerXML() > $path
update-typedata

Close the ISE and relaunch it.

You’ll see a bunch of errors like the following:

Set-Alias : Alias is not writeable because alias measure is read-only or constant and cannot be written to.

For some reason, some of the PSCX aliases are set to read-only and need the -Force parameter to get them to work.

Instructions for fixing each of the issues:

C:\Program Files\PowerShell Community Extensions\Profile\GenericAliases.ps1
Line 8
Set-PscxAlias measure MeasureObject -Force

C:\Program Files\PowerShell Community Extensions\Profile\PscxAliases.ps1
Line 28
Set-PscxAlias start Start-Process -Force

C:\Program Files\PowerShell Community Extensions\Profile\Debug.ps1
Line 72
set-alias gcs Get-CallStack -Option AllScope -Description "PSCX function alias" -Force
Line 89
set-alias ebp Enable-Breakpoints -Option AllScope -Description "PSCX function alias" -Force
Line 103
set-alias dbp Disable-Breakpoints -Option AllScope -Description "PSCX function alias" -Force

No Comments