PowerTab 0.96 Beta 3b
PowerTab 0.96 Beta 3b is released,( PowerTab.Zip Download )if you are already at 0.96 nothing much has changed but I have redone a great part of the Powertab setup
PowerTabSetup.ps1
There is no need to Dot source the setup script anymore PowerTab will be loaded directly after installation now, also if you forget to unblock the zip you only have to unblock the Powertabsetup.ps1 script it will onblock the other scripts itself (or you can paste in the code in the textfile into the console)
Next change is initialization code added to the profile this is now one command :
# Initialize PowerTab
& 'E:\PowerShell\Powertab\Init-TabExpansion.ps1' `
-ConfigurationLocation 'F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell'
you can change the location of the configuration file now in the setup, and you can move,rename or switch the TabExpansion database freely after installation but using the $powertabconfig object :
PoSH> $PowerTabConfig.Setup | fl
InstallPath : E:\PowerShell\Powertab
ConfigurationPath : F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
DatabaseName : TabExpansion.xml
DatabasePath : F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
But take care that changing the installation or configuration directory involves changing the profile
Also note that to make changes permanent you need to export the configuration using Export-PowerTabConfig by default it will save to the location speciefed in $powertabconfig but it can be overuled using parameters :
PoSH> Export-PowerTabConfig -
PoSH> ╔═ - ══════════════╗
PoSH> ║ -filename ║
PoSH> ║ -NoMessage ║
PoSH> ║ -path ║
PoSH> ╚═[1] 1-3 (3/3)]═══╝
PoSH>
PoSH>
only changes to the configuration are saved this way but you can can also call export-tabexpansiondatabase, that will also export the database
this function will now also work the same way save to location specified by $powertabconfig.setup by default, but you can set them with parameters.
* upgraders notes * :
to make upgrading more easy for following versions
- If upgrading from a version that already has a profile like this you can keep the profile information while upgrading, Setup will ask if you want to upgrade the database that is currently in memory, so you do not loose custom additions
- If a tabexpansion.xml data file does already exist in location selected, you can load it into memory and upgrade it so you do not loose custom addtions in that case also (new profile / old database ) , you do not need to save it to the same file to have a backup (or save at all as configuration will be saved anyway).
but most easy way to install from older versions is at least clean the profile, and better yet rename or delete old xml files first (or choose other configuration directory ), and accept defaults in setup to get the basic installation below, to be sure, but for later upgrades this should become much easier :
below how a basic installation of powertab looks like now (remember when old versions are found you can get different results )
A first installation with a Profile but no former PowerTab version installed (accepting default chooses) :
PoSH> dir
Directory: Microsoft.PowerShell.Core\FileSystem::E:\PowerShell\Powertab
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 8/11/2007 1:31 AM ColorThemes
-a--- 8/11/2007 1:31 AM 618 changes.txt
-a--- 8/11/2007 1:31 AM 21216 ConsoleLib.ps1
-a--- 8/11/2007 1:31 AM 1433 Get-ScriptParameters.ps1
-a--- 8/11/2007 1:31 AM 7945 Init-TabExpansion.ps1
-a--- 8/11/2007 1:31 AM 28672 Lerch.PowerShell.dll
-a--- 8/11/2007 1:31 AM 3293 New-PowerTabConfig.ps1
-a--- 8/11/2007 1:31 AM 20480 NTFS.dll
-a--- 8/11/2007 1:31 AM 2005 out-datagridView.ps1
-a--- 8/11/2007 1:30 AM 44129 PowerTab096_B3b.zip
-a--- 8/11/2007 1:31 AM 13976 PowerTabSetup.ps1
-a--- 8/11/2007 1:31 AM 2791 ReadMe.txt
-a--- 8/11/2007 1:31 AM 10752 Shares.dll
-a--- 8/11/2007 1:31 AM 20471 TabExpansion.ps1
-a--- 8/11/2007 1:31 AM 1645 TabExpansionCustomLib.ps1
-a--- 8/11/2007 1:31 AM 10192 TabExpansionLib.ps1
-a--- 8/11/2007 1:31 AM 13 Test.ps1
-a--- 8/11/2007 1:31 AM 432 UnBlockAllScripts.txt
-a--- 8/11/2007 1:31 AM 764 UsingThemes.txt
PoSH> E:\PowerShell\Powertab\PowerTabSetup.ps1
PowerTab 0.96 PowerShell TabExpansion Installation
Checking Instalation directory
Installation directory : E:\PowerShell\Powertab
Passed : Needed files available
Checking if Powertab script files are not blocked and unblock them when Needed :
FullName Unblocked
-------- ---------
E:\PowerShell\Powertab\ConsoleLib.ps1 True
E:\PowerShell\Powertab\Get-ScriptParameters.ps1 True
E:\PowerShell\Powertab\Init-TabExpansion.ps1 True
E:\PowerShell\Powertab\New-PowerTabConfig.ps1 True
E:\PowerShell\Powertab\out-datagridView.ps1 True
E:\PowerShell\Powertab\PowerTabSetup.ps1 False
E:\PowerShell\Powertab\TabExpansion.ps1 True
E:\PowerShell\Powertab\TabExpansionCustomLib.ps1 True
E:\PowerShell\Powertab\TabExpansionLib.ps1 True
E:\PowerShell\Powertab\Test.ps1 True
Checking for Profile availability and location :
Passed : Profile directory : F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
Passed : Profile available
Powertab Configuration :
The configuration of Powertab is saved in a XML file called PowerTabConfig.xml
To be able to permanently change configuration settings the user needs to have read/write access to this file
The default location for the configuration database is in the Profile directory 'P' , you can also choose 'I' for the in
stallation directory or 'O' for an other Location to store the Powertab Configuration database now,
Watch out !, when changing this setting after the installation you need to change the location in the profile PowerTab s
tartup code also
Pick Powertab Configuration Location
Pick location to store the Powertab Configuration database
or choose Other to provide custom location manual
[P] Profile Directory [I] Installation Directory [O] Other [?] Help (default is "P"):
Selected configuration path : F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
Creating new configuration
Default Config Created in F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
PowerTab Setup Configuration :
The TabExpansion database will be placed in same directory as profile but this database can be freely moved and renamed
after installation
Watch out if you change installation or configuration directory after installation you need to change initialisation cod
e in profile also !
Name Value
---- -----
InstallPath E:\PowerShell\Powertab
ConfigurationPath F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
DatabaseName TabExpansion.xml
DatabasePath F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
PowerTab Initialisation
For powertab to initalize when a new shell session is started it needs to add some code to the PowerShell profile
Add the following Code to your Profile For loading tabCompletion at startup ?
################ Start of PowerTab Initialisatie Code ########################
#
# added to Profile by PowerTab Setup For Loading of Custom TabExpansion,
#
# /\/\o\/\/ 2007
#
# http://ThePowerShellGuy.com
#
# Initialize PowerTab
& 'E:\PowerShell\Powertab\Init-TabExpansion.ps1' `
-ConfigurationLocation 'F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell'
################ End of PowerTab Initialisatie Code ##########################
If you choose No you need to run Init-TabExpansion.PS1 <Path where Powertabconfig.xml can be found> yourself every new s
ession to load PowerTab
Confirm
Are you sure you want to perform this action?
Performing operation "Add Content" on Target "Path: F:\Documents and Settings\Administrator.POSHWORKS\My
Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Tabexansion Database :
Create or Update Tabcompletion DataBase
the TabCompletion database is used to store Type, WMI and Custom expansion information
This information is used and needed for a lot of the extra functionality added by powertab
This database by default will be saved as : TabExpansion.xml
In directory : F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell
New existing Tabcompletion Database ?
Make new TabcompletionDatabase (in memory, will not override the saved database) ?
[N] No [Y] Yes [?] Help (default is "Y"):
Filling or updating the Powertab Tabexpansion database
Retrieve the data needed for Powertab from the different sources and fill or update the Tabexpansion database with it
.NET Types
The Type information of the loaded .NET namespaces will be enumerated and added to the Database
Load .NET types
Load Types into TabcompletionDatabase ?
[N] No [Y] Yes [?] Help (default is "Y"):
WMI CLasses
The WMI classes will be enumerated and information about them added to the Database
Load WMI Classes
Load WMI Classes into TabcompletionDatabase ?
[N] No [Y] Yes [?] Help (default is "Y"):
Custom tabexpansion additions
The included TabExpansionCustomLib contains some handy additions for the Custom Tabcompletion Library
Load Custom Library ?
Load predefined custom completion samples from TabExpansionCustomLib.ps1 into TabcompletionDatabase ?
[N] No [Y] Yes [?] Help (default is "Y"):
Current Custom Aliases :
Filter Text Type
------ ---- ----
cc @{name='';expression={}} Custom
cc @{Label='';expression={}} Custom
cc @{Label='';expression={};Width=10} Custom
tqb The quick brown fox jumps over the lazy dog Custom
ate Add-Tabexpansion Custom
rte Refresh-TabExpansion Custom
gtcom get-TabExpansionComputer Custom
gtc get-TabExpansionCustom Custom
ap SilentlyContinue Custom
ap Stop Custom
ap Continue Custom
ap Inquire Custom
mt AliasProperty Custom
mt CodeProperty Custom
mt Property Custom
mt NoteProperty Custom
mt ScriptProperty Custom
mt Properties Custom
mt PropertySet Custom
mt Method Custom
mt CodeMethod Custom
mt ScriptMethod Custom
mt Methods Custom
mt ParameterizedProperty Custom
mt MemberSet Custom
mt All Custom
al Default Custom
al None Custom
al Connect Custom
al Call Custom
al Packet Custom
al PacketIntegrity Custom
al PacketPrivacy Custom
al Unchanged Custom
h Get-help $^ -Full Custom
h Get-help $^ -Detailed Custom
h Get-help $^ -Examples Custom
Save the DataBase ? (will completly overwrite existing one !, to save with different name you can choose No here and use
export-tabexpansion with the -filename switch)
Note that by default NO changes to the database are saved and changes made are lost when closing the session
to make the changes permanent you need to save the Powertab database with Export-TabexpansionDatabase
this goes also for configuration changes made with $PowertabConfig to save only config chanes use export-PowerTabconfig
helper function
Save Tabcompletion ?
Save Tabcompletion ?
[N] No [Y] Yes [?] Help (default is "Y"):
Tabexpansion database exported to F:\Documents and Settings\Administrator.POSHWORKS\My Documents\WindowsPowerShell\TabEx
pansion.xml
Setup Completed :
Don''t forget to Save the database when you want the canges to be permanent
You can use the following Utilities for that, or re-run setupTabcompletion.ps1
PowerTab Utility functions :
Name
----
add-tabExpansion
add-TabExpansionComputersNetView
add-TabExpansionComputersOU
add-tabExpansionEnum
Add-TabExpansionEnumFromLastError
add-TabExpansionTypes
Export-tabExpansionDataBase
Export-TabExpansiontheme
get-tabExpansion
get-TabExpansionComputer
get-TabExpansionCustom
Import-TabExpansionDataBase
Import-TabExpansiontheme
Invoke-TabExpansionEditor
New-tabExpansionDataBase
Remove-tabExpansion
Update-TabExpansion
Update-TabExpansionTypes
Update-TabExpansionWmi
Press Enter to finish setup and intitialize PowerTab:
PowerTab version 0.96 Beta 3b PowerShell TabExpansion library
/\/\o\/\/ 2007 http://thePowerShellGuy.com
PowerTab Tabexpansion additions enabled : True
PowerTab Configuration :
Version : PowerTab version 0.96 Beta 3b
Colors : {PowerTab Color Configuration}
ShortcutChars : {PowerTab Shortcut Characters}
Setup : {PowerTab Setup Data}
DefaultHandler : ConsoleList
AlternateHandler : ConsoleList
Enabled : True
ShowBanner : True
AliasQuickExpand : True
FileSystemExpand : True
AutoExpandOnDot : True
AutoExpandOnBackSlash : True
DoubleBorder : True
DoubleTabEnabled : False
DoubleTabLock : False
CloseListOnEmptyFilter : True
SpaceComplete : True
DotComplete : True
BackSlashComplete : True
For more Information and examples about PowerTab Tabexpansions see :
The PowerTab PowerShell Tab Extension Overview Page
http://thepowershellguy.com/blogs/posh/pages/powertab.aspx
Enjoy, Greetings /\/\o\/\/
http://ThePowerShellGuy.com
PoSH>
You can see at the end of the setup the configuration settings that can be made, for example if you do not like the banner :
$powertabconfig.ShowBanner = $false
export-PowertabConfig
and it will be gone next time :)
also note that there are two extra functions now to make it even easier to work with themes:
Export-TabExpansiontheme
Import-Expansiontheme
, also I moved example themes to a themes directory to less clutter the powertab directory, as BS did send so much example themes ;-) (thanks again)
I changed all other links to this download also, and did remove some old confusing links from the PowerTab Overview Page.
I hope this new setup and configuration possibilities of PowerTab will help installing, tuning and upgrading PowerTab, (as former versions of 0.96 had some problems installing to a networklocation, so please let me know if you have still have any problems installing this version.
Enjoy,
Greetings /\/\o\/\/