Since I installed PowerShell 3 CTP 2 I’ve got his error when starting:
or by text
You are now entering pwrshll: ********
PS D:\reiser\Powershell\Scripts> Import-Module PowerTab
Get-Content : Cannot find path ‘Function:\TabExpansion’ because it does not exist.
At D:\DOCUMENTE\Documents\WindowsPowerShell\Modules\PowerTab\PowerTab.psm1:17 char:20
+ $OldTabExpansion = Get-Content Function:TabExpansion
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Function:\TabExpansion:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
PowerTab version 0.99.6.0 PowerShell TabExpansion Library
Host: ConsoleHost
PowerTab Enabled: True
Now when I installed PowerShell 3 RTM I’ve finally got annoyed by this message (I load powertab from within the profile) so I’ve done some research.
Seems that in PowerShell 3 TabExpansion has been replaced with TabExpansion2 : https://github.com/psget/psget/issues/16
So the only thing you will have to do is to modify the script PowerTab.psm1 , at line 17 char 20, instead of TabExpansion you should have TabExpansion2 like below:
The script should be located either in the PowerShell’s allusers(computer) profile here:
"$PSHOME\modules\Powertab\PowerTab.psm1" or "$((($env:psmodulepath).Split(";"))[1])\powertab\powertab.psm1”
(ussually C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowerTab\PowerTab.psm1)
or in your user profile:
"$((($env:psmodulepath).Split(";"))[0])\powertab\powertab.psm1” (ussually C:\Users\%username%\documents\WindowsPowerShell\Modules\PowerTab\PowerTab.psm1)
After that, no error occurs anymore as here:
Enjoy!
that works great thanks for sharing!