Active Directory Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail
How Long For Me
My Music To Me
<< Back To All Blogs
Customizing PowerShell for faster development with a default profile
Thursday, April 16th, 2009
As I have been using PowerShell continually for my build process lately, I have added some customization so my PowerShell prompt always opens in the same state. There are a number of other features you could add, but I will go over what I have been using thus far.
In order to customize PowerShell you need to save a file named profile1.ps1 under My Documents\WindowsPowerShell\. If this folder does not exist, create it and save the file at that location.
Any commands that are stored in this file will be run each time that you launch a new PowerShell window.
The commands that are currently in my profile are as follows:
# Sets an alias to install util which is used for installing cmdlets. You can then access install util as iu
set-alias iu C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
# Create a new PS drive which in this case maps to my subversion so I can operate on my SVN checkins with using a syntax svn:
new-psdrive -name svn -PSProvider filesystem -Root C:\SVN
# Add Visual Studio files such as nmake to the environment in PowerShell
$env:path += ";C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"
# Set the default location to be in svn:\
# Clear all previous output from the commands in the profile
This allows me to customize my PowerShell instance each time I open up a window to do builds, deploy changes, and the list goes on.
Defaultin' Tom Out.
Using Remote Powershell
Some Useful Powershell commands for the Linux nerds out there
Recursively removing SVN bindings with PowerShell
Programatically Retrieving an Assembly's PublicKeyToken through a PowerShell CmdLet
Uninstalling PowerShell V1.0 from Windows Server 2003
Currently no comments.
Add A Comment
Email Address: (not public, used to send notifications on further comments)
Enter the text above, except for the 1st and last character: