Sep 16, 2009 at 2:42 PM

Did version 1.2 drop Edit-File?

Sep 16, 2009 at 5:21 PM

No, it is still there.  Are you using the beta Module support for PowerShell 2.0?

98> gcm edit-file
CommandType     Name            Definition
-----------     ----            ----------
Function        Edit-File       param([string]$Path)...
Sep 16, 2009 at 8:48 PM

I've downloaded and installed the latest MSI .1.2 and I'm using V2 RC for Vista, I don't see any psm1 files include to load. Where are they installed to? I noticed the alias 'e' was no longer defined in the alias script also.

Sep 17, 2009 at 3:02 PM

I've completely uninstalled PSCX and re-installed with replace profile. Still I'm missing PSCX cmdlets. Running Get-Pssnapin shows the snapin is loaded. On my Windows 7 RTM box, works fine.

Sep 18, 2009 at 12:59 AM

It sounds like your profile is not running.  Have you run Set-ExecutionPolicy on this machine yet?  You might try manually running:

Add-PSSnapin Pscx
. "$Pscx:ProfileDir\PscxConfig.ps1"
Sep 18, 2009 at 12:45 PM

Edit-file is a compiled cmdlet, correct? It's not a problem loading my profile, running add-pssnapin pscx or execution policy setting:

PS C:\Users\cmiller6\bin> Get-ExecutionPolicy
PS C:\Users\cmiller6\bin> Add-PSSnapin Pscx
Add-PSSnapin : Cannot add Windows PowerShell snap-in Pscx because it is already added. Verify the name of the snap-in a
nd try again.
At line:1 char:13
+ Add-PSSnapin <<<<  Pscx
    + CategoryInfo          : InvalidArgument: (Pscx:String) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

PS C:\Users\cmiller6\bin> gcm edit-file
Get-Command : The term 'edit-file' is not recognized as the name of a cmdlet, function, script file, or operable progra
m. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ gcm <<<<  edit-file
    + CategoryInfo          : ObjectNotFound: (edit-file:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand



Sep 19, 2009 at 2:17 AM

Edit-File is a function that gets loaded via the call to PscxConfig.ps1.  Make sure you are executing this:

. "$Pscx:ProfileDir\PscxConfig.ps1"
Sep 20, 2009 at 11:42 PM

Opps, I was missing that line in my profile on my Vista machine.