NerdyHearn
Home
Blog

Contact
Mailing List

Software

Active Directory Products
Object Compare
Permission Compare

IPhone Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail

Sites
DocuTerminal
How Long For Me
My Music To Me
SaveMySerials
TypeCount

Blog
Twitter

NerdyHearn - Blog


<< 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:\
set-location svn:\
# Clear all previous output from the commands in the profile
cls

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.

Tags

PowerShell

Related Blogs

Programatically Retrieving an Assembly's PublicKeyToken through a PowerShell CmdLet
Uninstalling PowerShell V1.0 from Windows Server 2003
Some Useful Powershell commands for the Linux nerds out there
Recursively removing SVN bindings with PowerShell
Determine Forest and Domain Functional Levels in Powershell

Comments

Currently no comments.

Add A Comment

Name:


URL:


Email Address: (not public, used to send notifications on further comments)


Comments:



Enter the text above, except for the 1st and last character:


NerdyHearn - Latest tech news relating to C#, ASP.NET, SharePoint, PHP, general development, and more. DocuTerminal - Online Filing Cabinet solution. Scan, search and archive your paper documents. SaveMySerials - Protect yourself from theft, fire, natural disasters and more by recording your serial numbers My Music To Me - Stream your subsonic music collection to your Sonos wireless system TypeCount - Count how often you type across different computers! ServrTrackr - Monitor your SSL certificates, website uptime, and DNS configurations