Category Archives: PowerShell

Pruning Elmah Files with Powershell

We use (and love) Elmah. Due to many reasons we decided to opt for the XML file logging to AppData. This works great and is super simple to set up. The only issue is that on our test and production servers we were filling up the AppData directory and after awhile Elmah.axd would take minutes…

PowerShell TFS WorkSpace Initialization Script

I needed a way to set up developer machines quick for access to a new Team Foundation Server rollout awhile back. Normally to set up a workspace on each dev’s machine I’d have to do the following: A. Teach everyone how to set up workspaces B. Show them how to get latest C. Hope they…

Loading PowerShell Profiles from Other Script Files

PowerShell profiles are used for loading common scripts, add-in’s, functions, etc into the PowerShell session at startup. There are four different locations where profiles are loaded from: You can have four different profiles in Windows PowerShell. The profiles are listed in load order. The most specific profiles have precedence over less specific profiles where they…

Custom Google Maps Geocode Powershell CmdLet

This may look like a repeat… well.. because it is… BUT.. you cannot find the old post. Why? Because, well … it no longer exists. My old host decided to accidentally delete my account. Yeah. Oops. After that nightmare, I’ve moved to a new host where the grass is greener, the hippies wear deodorant and…

Creating .NET Event Sources with PowerShell

I use Enterprise Library for Logging and I use different event sources for each app. I’ve noticed that creating event sources is kind of a pain sometimes. Either you have to write an app that does it for you, or you have to write some logic in your code that checks for the event source….