Power shell profiles

I am doing a lot of power shell lately, and recently discovered the profiles concept, which let’s you keep all your favorite PS scripts organized in a single place and makes them available to you from all your drives, very similar to your dos environmental variables, it certainly saves a lot of time….

As of know my profile includes the following gathered from various posts on the internet…

**Update**: added method for clearing event log and referenced the same while restarting biztalk..

function .CTFSGet-LatestVersion() {


$location = get-location

tf.exe get $location /version:T /recursive /force /login:$login


function .CClearEventLog() {

Clear-EventLog -LogName Application


function .CRestartBizTalk() {

get-service *BizTalkServerApplication*

get-service *BizTalkServerApplication* | foreach-object -process {restart-service $_.Name}

get-service *BizTalkServerApplication*



In order to create a new PS profile run the following cmd and later “notepad $profile” to edit the same.

new-item -path $profile -itemtype file -force

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: